This problem occurs during "modification". When you click "modify" in the background, some initial values appear in the text box.
Bll. Manager BLL = new BLL. Manager ();
Model. Manager model = BLL. GetModel (_ id );
Ddlroleid. selectedvalue = model. role_id.tostring ();
Rblislock. selectedvalue = model. is_lock.tostring ();
Txtusername. Text = model. user_name;
Txtusername. readonly = true;
If (! String. isnullorempty (model. user_pwd ))
{
Txtuserpwd. attributes ["value"] = txtuserpwd1.attributes ["value"] = defaultpassword;
// Txtuserpwd. attributes ["text"] = txtuserpwd1.attributes ["text"] = defaultpassword;
}
Txtuserpwd. attributes ["text"] cannot obtain the password in the text box, that is, the text box is empty, and txtuserpwd. attributes ["value"] is acceptable, but does textbox contain the attribute "value ??, I don't know much about it here. It turns into a human problem.
Textbox Control textm When ode = "password", after a server event is triggered, the display value of textbox is cleared.
This day I encountered a problem:
When the Textbox Control textmode = "password", after a server event is triggered, the display value of textbox is cleared.
I have been searching for a long time on the Internet and have not found any solution.
Therefore, I had to find a method to solve the problem. After a server event is triggered, the attacker found that the text value of textbox is not empty, at the same time, textbox1.attributes ["value"] = "123456789" is displayed on the Internet. It can be a textbox variable value.
So I will make it writable In the textbox ontextchanged event:
This. textbox1.attributes ["value"] = This. textbox1.text;
Or
This. textbox1.attributes ["value"] = request. Form [textbox1.clientid];
The result is OK.
However, if you want to release the value of textbox1 in the response, it will be cleared after a server event is triggered. In fact, there is no way to handle this problem during the hour.
If a friend has a better solution, please let me know. I have tried it here!
To ensure the consistency, onpaste = "Return false" oncut = "Return false" prevents the textbox from being glued to the lag or optimize mode.