Click here to Skip to main content
15,900,378 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Disk space problem Pin
Christian Graus13-May-08 21:21
protectorChristian Graus13-May-08 21:21 
GeneralRe: Disk space problem Pin
SreejithAchutan13-May-08 21:25
SreejithAchutan13-May-08 21:25 
GeneralRe: Disk space problem Pin
eyeseetee13-May-08 21:34
eyeseetee13-May-08 21:34 
GeneralRe: Disk space problem Pin
Christian Graus13-May-08 21:37
protectorChristian Graus13-May-08 21:37 
GeneralRe: Disk space problem Pin
leckey14-May-08 3:00
leckey14-May-08 3:00 
QuestionUsing Explicit Resource Expression and Shared Resources Pin
gotdablues13-May-08 8:02
gotdablues13-May-08 8:02 
AnswerRe: Using Explicit Resource Expression and Shared Resources Pin
Gayani Devapriya16-May-08 8:35
Gayani Devapriya16-May-08 8:35 
QuestionSaving User Name And Password. Pin
Pranav Thakur13-May-08 5:29
Pranav Thakur13-May-08 5:29 
Hi,

I have written a code to save username and password on client machien using cookie.The code is as follows:-


HttpCookie loginCookie = new HttpCookie("logCoockie");
if (this.Login1.RememberMeSet)
{

//Check if the browser support cookies
if ((Request.Browser.Cookies))
{

//Check if the cookie with name LoginCookie exist on user's machine
//if (loginCookie == null)
//{
//Create a cookie with expiry of 30 days
loginCookie.Expires = DateTime.Now.AddDays(30);
//Write username to the cookie
loginCookie.Values.Add("UNAME", this.Login1.UserName.ToString());
//Write password to the cookie
loginCookie.Values.Add("UPASS", this.Login1.Password.ToString());
//}
//If the cookie already exist then wirte the user name and password on the cookie
//else
//{
// loginCookie.Values.Add("UNAME",this.Login1.UserName.ToString());
// loginCookie.Values.Add("UPASS",this.Login1.Password.ToString());
//}
}
Response.Cookies.Add(loginCookie);
}
else
{

Response.Cookies["logCoockie"].Expires = DateTime.Now.AddDays(-3);

}

But it is not recommended to save such information in cookie.Can anyone help to use any alternative way to save such inforamtion.
Thanks.
AnswerRe: Saving User Name And Password. Pin
l0kke13-May-08 6:19
l0kke13-May-08 6:19 
GeneralRe: Saving User Name And Password. Pin
Pranav Thakur13-May-08 22:12
Pranav Thakur13-May-08 22:12 
GeneralRe: Saving User Name And Password. Pin
l0kke13-May-08 22:39
l0kke13-May-08 22:39 
AnswerRe: Saving User Name And Password. Pin
Christian Graus13-May-08 19:18
protectorChristian Graus13-May-08 19:18 
QuestionImage did not appear in DataList Pin
miss nadia13-May-08 4:32
miss nadia13-May-08 4:32 
Questionstore procedure to Update data Pin
justintimberlake13-May-08 3:34
justintimberlake13-May-08 3:34 
AnswerRe: store procedure to Update data Pin
SomeGuyThatIsMe13-May-08 4:21
SomeGuyThatIsMe13-May-08 4:21 
GeneralRe: store procedure to Update data Pin
justintimberlake13-May-08 17:56
justintimberlake13-May-08 17:56 
GeneralRe: store procedure to Update data Pin
SomeGuyThatIsMe14-May-08 1:56
SomeGuyThatIsMe14-May-08 1:56 
QuestionA socket operation was attempted to an unreachable host Pin
eyeseetee13-May-08 3:27
eyeseetee13-May-08 3:27 
AnswerRe: A socket operation was attempted to an unreachable host Pin
Oakman14-May-08 21:41
Oakman14-May-08 21:41 
Questionincrement of value of a char variable???? Pin
mr.mohsen13-May-08 3:21
mr.mohsen13-May-08 3:21 
AnswerRe: increment of value of a char variable???? Pin
mr.mohsen13-May-08 3:30
mr.mohsen13-May-08 3:30 
AnswerRe: increment of value of a char variable???? Pin
Sankar Komma 13-May-08 11:10
Sankar Komma 13-May-08 11:10 
Questioninitializing DataColumnCollection?? Pin
Karan_TN13-May-08 2:53
Karan_TN13-May-08 2:53 
AnswerRe: initializing DataColumnCollection?? Pin
led mike13-May-08 4:23
led mike13-May-08 4:23 
GeneralRe: initializing DataColumnCollection?? Pin
Karan_TN13-May-08 19:40
Karan_TN13-May-08 19:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.