Imports System.Web.Profile
Imports System.Web.Security
Namespace UserPro
Public Class ProInfo
Inherits ProfileBase
Public Shared Function GetUserProfile(username As String) As ProInfo
Return TryCast(Create(username), ProInfo)
End Function
Public Shared Function GetUserProfile() As ProInfo
Return TryCast(Create(Membership.GetUser().UserName), ProInfo)
End Function
<SettingsAllowAnonymous(False)> _
Public Property FullName() As String
Get
Return TryCast(MyBase.Item("FullName"), String)
End Get
Set(value As String)
MyBase.Item("FullName") = value
End Set
End Property
<SettingsAllowAnonymous(False)> _
Public Property Age() As String
Get
Return TryCast(MyBase.Item("Age"), String)
End Get
Set(value As String)
MyBase.Item("Age") = value
End Set
End Property
<SettingsAllowAnonymous(False)> _
Public Property Email() As String
Get
Return TryCast(MyBase.Item("Email"), String)
End Get
Set(value As String)
MyBase.Item("Email") = value
End Set
End Property
<SettingsAllowAnonymous(False)> _
Public Property PhoneNo() As String
Get
Return TryCast(MyBase.Item("PhoneNo"), String)
End Get
Set(value As String)
MyBase.Item("PhoneNo") = value
End Set
End Property
<SettingsAllowAnonymous(False)> _
Public Property Uni() As String
Get
Return TryCast(MyBase.Item("Uni"), String)
End Get
Set(value As String)
MyBase.Item("Uni") = value
End Set
End Property
<SettingsAllowAnonymous(False)> _
Public Property Program() As String
Get
Return TryCast(MyBase.Item("Program"), String)
End Get
Set(value As String)
MyBase.Item("Program") = value
End Set
End Property
<SettingsAllowAnonymous(False)> _
Public Property Year() As String
Get
Return TryCast(MyBase.Item("Year"), String)
End Get
Set(value As String)
MyBase.Item("Year") = value
End Set
End Property
End Class
End Namespace