Once you fill the object, where are you storing it? In session? Serialized
to disk? Not at all?
Since you are simply creating a group of properties/fields a struct might be
a better option, but you still have to store it:
Dim MyClass As UserDetails = new UserDetails()
'lines to fill class here
Session("MyClass") = MyClass
To use:
Dim MyClass as UserDetails = CType(Session("MyClass"), MyClass)
You could make a static class to hold the variables, but you could only have
one user at a time. Then, your code would work without saving the object
off.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge
************************************************** **************************
****
Think Outside the Box!
************************************************** **************************
****
"yop" <ai*******@oceanfree.net> wrote in message
news:06****************************@phx.gbl...
Hello
I have an application, Login page, enter UserName &
Password.
Function in Users called GetUserDetails and checks the
details and if they are valid calls a function to fill
the following in the class component called
Public Class UserDetails
Public UserID As Integer
Public UserName As String
Public FullName As String
Public Email As String
End Class
So I would have thought now that what ever page I goto
that I could retreive the email or fullname from the
class above without having the call the GetUserDetails.
I use the following code.
'Load the User Name textbox
Dim userDetails As New
ASPNET.ASSETREGISTER.UserDetails()
msgfullname.Text = " Logged In: " &
userDetails.FullName
But it does not fill it, any ideas?
thanks in advance