I want to maintain user session in my project...the problem i am facing is when any user login is nt maintained..help it's urgent..
Refer
http://www.dotnetfunda.com/articles/article808-how-to-write-a-simple-login-page-in-aspnet.aspx
login is easy but how to create a session of a user??
After Login is successful set the UserName or UserId of user in Session variable
Session["UserName"] = txtUserName.Text;
thankyou it is very useful...but tell me 1 thing.. i have used login control in my web form so i have to write 1st statement or 2nd ??
Session["New"]=Login1.Username;
or
Session["New"]=login1.Username.Text;
Just try to use 2nd option.
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.