PDA

View Full Version : [CLOSED] Browser remember-functionality for loginpage



blueworld
Jan 27, 2014, 4:28 PM
Hi,

on most websites, if you login, the browser asks you if the password should be saved.

I am doing a extnet login page right now, and I am looking for a way to do that.

I have searched a bit around, and some people do it by saving username and password in a cookie, which is unsafe imho.

I am not sure how the browser decides whether to show the "save password" box or not.

I have found this:




to make the browser ask to store the password, user name and password boxes must be in a form and that form must be actually submitted. The submit button could return false from the onclick handler (so the submit does not actually happen).

to make the browser restore the previously stored password, the input boxes have to exist in the main HTML form and not be created through javascript dynamically. The form can be created with display:none.


Any idea how I can do that with extnet textboxes?

Daniil
Jan 28, 2014, 4:31 AM
Hi @blueworld,

Here is an example:
http://forums.ext.net/showthread.php?1102&p=124336&viewfull=1#post124336

blueworld
Jan 28, 2014, 10:50 AM
Thank you Daniil,

regarding your example, what would be the right code-behind event to do the login? Currently I have a click listener on the login button that calls a DirectMethod, but somehow it is not executed on the first click.

Daniil
Jan 28, 2014, 12:20 PM
A DirectMethod cannot be used at the same time with submitting a form. It means a hard PostBack, i.e. page reload.

You have to put the logging code into the Page_Load.