0

I need a check box in my login form for my company application. Need help because i am a noob and dont know how..!!!! How am i supposed to do it with cookies?

        private void chkRememberMe_CheckedChanged(object sender, EventArgs e)
        {

        }

thanks for your help..!!! i am in a bit of rush..!!!

  • not too clear what is it your asking, nor why you pasted so much code nobody cares about (like label1_Click, etc) ... I can imagine people opening the question, seeing the amount of code (easy by seeing there's a scroller on it) and going on to something else ... – Noctis Nov 17 '13 at 22:14
  • yeah you were right....!!!! i wanna add a remember me checkbox im my login form...!!!! – AleLaskaris Nov 17 '13 at 22:16

1 Answers1

0

What you want is to have a check box on the form, and then, you have 2 things to do.

On login, check if the checkbox is checked. If it is, save the user/pass to a cookie. (which means, on load you'll first need to check that cookie to see if you have the data already so you can login straight away).

On unchecking the checkbox, you might want to clear that cookie.

There are plenty of security issues with saving passwords onto the client side, but I'm sure you're either aware of it, or if not, could find plenty of material on it on the net.

Also, you'll have to consider when / why you deleted that cookie ... on logout? only when the user deselects the "remember me", and so on.

Noctis
  • 11,507
  • 3
  • 43
  • 82
  • i keep seeing that i need asp.net for cookie checking...but i have no idea....is it possible to write me a small code on how exactly i am supposted to do it? – AleLaskaris Nov 17 '13 at 22:34