I have created a class that returns a class object which have info about the username,pwd,emailid of current user.
Now i want to use this email id in my aspx.cs page to show the current logged in user and its email id....
i m creating an isntance of that class and using that to get the user email...
but i m getting null...

anyone had any idea?

Thanks in Advance,

my class is like this

 public myUser ValidateUser(string userName,string password)
        {
//validates user with UN and pwd
}
return myUser;

where myUser keeps UN,pwd, emailid

Now i have an aspx.cs page which is getting redirected when teh above class verifies it since above class is used in login page

Now i m getting all teh data in return myUser;
I wnat to use it in the redirected page....
I don't think any viewstate or server variables are needed...is it so...?

you can either run the class again to retrieve it again, you can put the information into a querystring that goes to the new page, put it in session variables, put it in cookies, put it into files, or put it into a form, and post the form to the new page.

There's many options

Or.. you can just validate on the new page, and redirect back if it fails?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.