Click here to Skip to main content
13,055,754 members (48,533 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am creating a login from in windows application and i have a remember me checkbox in the login page. can give me a code the remember me check box in the C# windows application
Posted 18-Feb-13 20:26pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Well if you want to introduce remember Me checkbox (Most of the time we implement it in Web applications) you take decision that where you store that information. You can store it to client pc. In client side you can store it to any text/xml file or windows registry which you prefer with encrypted way. When user open windows executable file, Login page load event check location that any remeber be data is exists or not to a specific location. If so then it read that data and assign that to the login page userid/password textbox and checked remember me checkbox. If anyone uncheck remember be checkbox and click login button that time first it delete remember be information from client location(file/registry).Psedo code like

LoginForm_Load(object sender, EventArgs e)
    RememberMe remember= Helper.GetRememberMe();
    If (null != remember)
       txtUserId = remeber.UserId;
       txtPassword = remember.Password;

btnLogin_Click(object sender, EventArgs e)
       var remember = new RememberMe{UserId = txtUserId.Text, Password=txtPassword.Text};

You just need to implement Helper class where GetRememberMe, ForgetMe functionality api will be there.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 19 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100