Click here to Skip to main content
15,921,643 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPrinting problem Pin
umashankergr830-May-07 1:59
umashankergr830-May-07 1:59 
AnswerRe: Printing problem Pin
kubben30-May-07 5:13
kubben30-May-07 5:13 
GeneralRe: Printing problem Pin
umashankergr830-May-07 6:52
umashankergr830-May-07 6:52 
GeneralRe: Printing problem Pin
kubben30-May-07 7:39
kubben30-May-07 7:39 
GeneralRe: Printing problem Pin
umashankergr830-May-07 8:01
umashankergr830-May-07 8:01 
GeneralRe: Printing problem Pin
kubben30-May-07 8:04
kubben30-May-07 8:04 
QuestionHow to implement remember me next time feature Pin
deepalititi30-May-07 1:53
deepalititi30-May-07 1:53 
AnswerRe: How to implement remember me next time feature Pin
nareshss30-May-07 2:02
nareshss30-May-07 2:02 
Login Control: builtin control for user autentication in it there is two textboxes(UserName and Password) and one CheckBox("Remember me next time") and a button(Login).

the Remember me next time check box is not working bydefault. i m doing that in my way below is the code for Working "Remember me next time" checkbox.

first we have to put login control on page like below

<asp:login id="Login1" runat="server" onloggedin="Login1_LoggedIN">

then do this code on Login1_LoggedIN Event like below
protected void Login1_LoggedIN(object sender, EventArgs e)

{

CheckBox rm = (CheckBox)Login1.FindControl("RememberMe");

if (rm.Checked)

{

HttpCookie myCookie = new HttpCookie("myCookie");

Response.Cookies.Remove("myCookie");

Response.Cookies.Add(myCookie);

myCookie.Values.Add("Email", this.Login1.UserName.ToString());

myCookie.Values.Add("Pass", this.Login1.Password.ToString());

DateTime dtExpiry = DateTime.Now.AddDays(15); //you can add years and months too here

Response.Cookies["myCookie"].Expires = dtExpiry;

}

}

and then do this code on Page_Load Event
protected void Page_Load(object sender, EventArgs e)

{

if (!IsPostBack)

{


if (Request.Cookies["myCookie"] != null)

{

HttpCookie cookie = Request.Cookies.Get("myCookie");

string emailID = cookie.Values["Email"].ToString();

string password = cookie.Values["Pass"].ToString();

if (Membership.ValidateUser(emailID, password))

{

FormsAuthentication.RedirectFromLoginPage(emailID, true);

}

}

}



}




think its useful for u
i find this code from codeproject only......
bye
naresh.s.s
GeneralRe: How to implement remember me next time feature Pin
deepalititi30-May-07 2:31
deepalititi30-May-07 2:31 
GeneralRe: How to implement remember me next time feature Pin
Not Active30-May-07 3:25
mentorNot Active30-May-07 3:25 
GeneralRe: How to implement remember me next time feature Pin
deepalititi30-May-07 18:47
deepalititi30-May-07 18:47 
GeneralRe: How to implement remember me next time feature Pin
deepalititi31-May-07 18:59
deepalititi31-May-07 18:59 
AnswerRe: How to implement remember me next time feature Pin
Sathesh Sakthivel30-May-07 2:06
Sathesh Sakthivel30-May-07 2:06 
QuestionImage Swaping. Pin
Khan.Bangash30-May-07 1:16
Khan.Bangash30-May-07 1:16 
AnswerRe: Image Swaping. Pin
Fred_Smith30-May-07 4:38
Fred_Smith30-May-07 4:38 
GeneralRe: Image Swaping. Pin
Khan.Bangash30-May-07 5:06
Khan.Bangash30-May-07 5:06 
QuestionCan I get an alert box on my local computer when someone access my web page? Pin
salon30-May-07 1:08
salon30-May-07 1:08 
AnswerRe: Can I get an alert box on my local computer when someone access my web page? Pin
karthik_dotnet130-May-07 1:37
karthik_dotnet130-May-07 1:37 
GeneralRe: Can I get an alert box on my local computer when someone access my web page? Pin
salon30-May-07 1:44
salon30-May-07 1:44 
GeneralRe: Can I get an alert box on my local computer when someone access my web page? Pin
karthik_dotnet130-May-07 1:54
karthik_dotnet130-May-07 1:54 
GeneralRe: Can I get an alert box on my local computer when someone access my web page? Pin
salon30-May-07 2:03
salon30-May-07 2:03 
GeneralRe: Can I get an alert box on my local computer when someone access my web page? Pin
karthik_dotnet130-May-07 2:10
karthik_dotnet130-May-07 2:10 
GeneralRe: Can I get an alert box on my local computer when someone access my web page? Pin
salon30-May-07 2:32
salon30-May-07 2:32 
GeneralRe: Can I get an alert box on my local computer when someone access my web page? Pin
karthik_dotnet130-May-07 3:10
karthik_dotnet130-May-07 3:10 
GeneralRe: Can I get an alert box on my local computer when someone access my web page? Pin
salon30-May-07 3:39
salon30-May-07 3:39 

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.