Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use a class globally?

Status
Not open for further replies.

RichS

Programmer
Apr 24, 2000
380
0
0
US
I have a vb class "User" as follows:

Public Class User
Private m_strUserName As String
Private m_intUserID As Integer

Public Property UserName() As String
Get
UserName = m_strUserName
End Get
Set(ByVal Value As String)
m_strUserName = Value
End Set
End Property
Public Property UserID()
Get
UserID = m_intUserID
End Get
Set(ByVal Value)
m_intUserID = Value
End Set
End Property

End Class

I want to set these properties in a Login page and use them throughout the ASP.NET application (on various pages).

Is this possible? My experience with classes is limited.
 
One way to do is using Session variable. Declare a Session variable when the first time Page is requested.
Access these variables throught out the session.

Hope this helps!

[thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top