Click here to Skip to main content
15,890,557 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhighlight a particular column in asp menu without mouse hover Pin
ashok@techxygen16-Jun-08 0:37
ashok@techxygen16-Jun-08 0:37 
Questionweb config in asp.net 2.0 Pin
trilokharry16-Jun-08 0:31
trilokharry16-Jun-08 0:31 
AnswerRe: web config in asp.net 2.0 Pin
Christian Graus16-Jun-08 2:24
protectorChristian Graus16-Jun-08 2:24 
Questionpagemethod does not render script execution Pin
Rritesh Ravlani16-Jun-08 0:08
Rritesh Ravlani16-Jun-08 0:08 
Questionhow to remember password in login page . Pin
deepthy.p.m15-Jun-08 23:47
deepthy.p.m15-Jun-08 23:47 
AnswerRe: how to remember password in login page . Pin
varshavmane16-Jun-08 0:50
varshavmane16-Jun-08 0:50 
GeneralRe: how to remember password in login page . Pin
deepthy.p.m16-Jun-08 1:36
deepthy.p.m16-Jun-08 1:36 
GeneralRe: how to remember password in login page . Pin
varshavmane16-Jun-08 1:53
varshavmane16-Jun-08 1:53 
Use this javascript Function:

function readCookie(cookies)
{
var txtuname;
var txtpass;
var chkRememberLogin;

if(document.getElementById('ctl00_CustomLogin_txtUserName') != null)
{
txtuname = document.getElementById('txtUserName');
txtpass = document.getElementById('txtPassword');
chkRememberLogin = document.getElementById('chkCookie');
}
else
{
txtuname = document.getElementById('txtUserName');
txtpass = document.getElementById('txtPassword');
chkRememberLogin = document.getElementById('chkCookie');
}


if (document.cookie.length>0 && txtuname.value.length>0 )
{
// check the index of the username that is entered by user in Username text box
var c_start=document.cookie.indexOf(txtuname.value);
if (c_start!=-1)
{
var c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1)
{
c_end=document.cookie.length;
}
var value= unescape(document.cookie.substring(c_start,c_end));
var arr = new Array(10);
arr= value.split('=');
// if only 0ne equal sign is present that is default one
if(arr[0]==txtuname.value && arr.length==2)
{
txtpass.value=arr[1];
chkRememberLogin.checked = true;
}
// if the password contain =(equal) signs in it
else if(arr[0]==txtuname.value && arr.length > 2)
{
var pass=arr[1];
for(i=2;i<arr.length;i++)>
{
pass += arr[i];
}
txtpass.value=pass;
chkRememberLogin.checked = true;
}
else
{
txtpass.value="";
chkRememberLogin.checked = false;
}
}
else
{
txtpass.value="";
chkRememberLogin.checked = false;
}
}
else
{
txtpass.value="";
chkRememberLogin.checked = false;
}
}

In Page Load Put this:

txtPassword.Attributes.Add("OnFocus", "javascript:readCookie('" & Request.Cookies.ToString() & "');")

Above line will get the password in password textbox on focus event.

Finally on Login Button Click Event where u have to store password in cookies:

If chkRememberMe.Checked Then
Dim cookie As New HttpCookie(txtUserName.Value)
Response.Cookies.Add(cookie)
cookie.Values.Add("", txtPassword.Value + ";")

Response.Cookies(txtUserName.Value).Expires = DateTime.Now.AddDays(15)

Else
Response.Cookies(txtUserName.Value).Expires = DateTime.Now
End If

Hope this helps u....
AnswerRe: how to remember password in login page . Pin
Christian Graus16-Jun-08 2:25
protectorChristian Graus16-Jun-08 2:25 
QuestionProblem with Keep me Logged in. Pin
varshavmane15-Jun-08 22:51
varshavmane15-Jun-08 22:51 
AnswerRe: Problem with Keep me Logged in. Pin
Ravi Sant3-May-11 0:23
Ravi Sant3-May-11 0:23 
QuestionCrosstab Problem Pin
SreejithAchutan15-Jun-08 22:45
SreejithAchutan15-Jun-08 22:45 
AnswerRe: Crosstab Problem Pin
Ravi Sant3-May-11 0:25
Ravi Sant3-May-11 0:25 
Questionhow to fill value in textbox in panel Pin
Sneha Bisht15-Jun-08 22:44
Sneha Bisht15-Jun-08 22:44 
AnswerRe: how to fill value in textbox in panel Pin
Masood Kochi,SSF15-Jun-08 23:26
Masood Kochi,SSF15-Jun-08 23:26 
GeneralRe: how to fill value in textbox in panel Pin
Sneha Bisht16-Jun-08 0:05
Sneha Bisht16-Jun-08 0:05 
Questionhow to download a file Pin
Nika Asgari15-Jun-08 22:38
Nika Asgari15-Jun-08 22:38 
AnswerRe: how to download a file Pin
Masood Kochi,SSF15-Jun-08 23:32
Masood Kochi,SSF15-Jun-08 23:32 
AnswerRe: how to download a file Pin
Ravi Sant3-May-11 0:26
Ravi Sant3-May-11 0:26 
Questionimage compress Pin
pradeep kumarappagari15-Jun-08 22:11
pradeep kumarappagari15-Jun-08 22:11 
AnswerRe: image compress Pin
Ravi Sant3-May-11 0:27
Ravi Sant3-May-11 0:27 
QuestionSerial Port on Web Pin
caradri15-Jun-08 22:05
caradri15-Jun-08 22:05 
Questioncreate dynamic dropdown Pin
Member 387988115-Jun-08 20:37
Member 387988115-Jun-08 20:37 
AnswerRe: create dynamic dropdown Pin
Masood Kochi,SSF15-Jun-08 23:40
Masood Kochi,SSF15-Jun-08 23:40 
AnswerRe: create dynamic dropdown Pin
Ravi Sant3-May-11 0:28
Ravi Sant3-May-11 0:28 

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.