简体   繁体   中英

ASP.NET password textbox value set to “Password” automatically

I have a password changer web form in which the admin can just enter a password to be saved in the configuration.

The problem is that when the input text box is left blank, on submit, code behind file receives the password text-box value as "Password" without quotes.

This causes the password to be changed even though it was not intended.

How to fix this?

There is two possiblities

1. Make sure you not set value/text of your password box

2. Make autocomplete off your password box field by adding autocomplete="off" attribute.

问题是,有一个jquery水印插件正在设置文本框的值。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM