Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i have a site with admin and normal login for one site. both login have different pages.

mysite.com/admin/login.aspx
mysite.com/user/login.aspx.


remember passwords for users on login page also show on the registration page on chrome browser. i have clear the textbox on username and password inside ispostback for registration and it works on other browser but not in chrome.

is there any other way to remove the user name and password from sign up page and only show it on a sign in page.

here is my code on register page

C#
if(!ispostback)
{
txtusername.text = "";
txtpassword.text = "";
}
Posted
Comments
[no name] 30-Sep-15 1:33am    
Use autocomplete="off" in your textboxes or form.
Shivaram_i 30-Sep-15 2:04am    
Can you try
txtusername.text=string.empty;

1 solution

Modern browsers take control over this and override whatever settings your code uses. If the user wants a browser to remember their password that is their choice, it's not for you to choose for them. If they don't want the browser to remember their password then they'll stop their browser from doing so. Even things like the autocomplete attribute are now ignored in some browsers. Leave your client to control their own browser experience, it's not for you to worry about.
 
Share this answer
 
Comments
ravikhoda 30-Sep-15 7:33am    
Hi,

thanks for suggestion, yes i understand that remember me should work but it should be show that only on login page not on register page i guess. more over above code works in ff and IE and safari for windows and not only in Chrome browser, that's why i thought there has to be something else.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900