How to store the values in cookies without using forms authentication

Posted by Kavi.Sirius under ASP.NET on 5/9/2012 | Points: 10 | Views : 1164 | Status : [Member] | Replies : 1
hi,

Is there any possible to store the values in cookies without using the forms authentication

because in my application if user login their page, their username and password must be store in cookies.
so after they login means it directly go to home page.(not login page)

Thanks in advance.

Regards
Kavi.n



Responses

Posted by: Funda on: 5/9/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Step1:
Store Value in Cookie....
Response.Cookies["SA"]["PSU"] = userNAme;

Response.Cookies["SA"]["PSID"] = ID
;
Step 2:
Get the Value from Cookie....
if (Request.Cookies["SA"]["PSU"] != "Value" && Request.Cookies["SA"]["PSID"] == "1")

re direct to login page.

Note :
["SA"] will be the Cookie Name


Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response