Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
What do you mean by ("YourApplogin")???

Login.aspx.cs

C#
if (chkRemember.Checked)
{
    HttpCookie cookie = new HttpCookie("YourAppLogin");
    cookie.Values.Add("username", txtUsername.Text);
    cookie.Expires = DateTime.Now.AddDays(15);
    Response.Cookies.Add(cookie);
}


And
What do you mean by???
Now you should add this code to every page that requires login :

C#
if (Request.Cookies["YourApLogin&"] != null)
{
string username = Request.Cookies["YourAppLogin"].Values["username"]);
}
Posted
Updated 18-May-11 23:55pm
v2
Comments
#realJSOP 19-May-11 5:55am    
Are you leaving a message for an article author?
Albin Abel 19-May-11 6:02am    
This question you are pointing to whom? Whatever it is "YourApplogin" is simply an identity for the cookie, just to identify the particular cookie from other cookies. It can be any name
a1sujan 19-May-11 6:06am    
What do you mean by???
Now you should add this code to every page that requires login :
In Which page should I Used it?? Give an example like
Sandeep Mewara 19-May-11 6:52am    
Are you talking to us or discussing some other answer/article?
Smithers-Jones 19-May-11 7:40am    
You seem to be very confused.

YourAppLogin is, I guess, short for Your Application Login. This is simply a name to identify that Cookie.
 
Share this answer
 
YourApplogin is cookie name here.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900