0

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,

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by SheSaidImaPregy
0

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...?

Edited by mike_2000_17: Fixed formatting

0

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?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.