Reputation: 1049
I am trying to set the password textbox
back to the text entered before a checkbox
is and has AutuoPostback
.
Session["passwordText"] = txt_Password.Text;
This is on my pageLoad and then I have tried to add(below) in my CheckedChanged
but it says Method Add
has 2 parameters and is invoked with 1 argument? What should i include with passWord
.
var passWord = Session["passwordText"].ToString();
txt_Password.Attributes.Add(passWord);
Upvotes: 0
Views: 89
Reputation: 15893
txt_Password.Attributes.Add("value", passWord);
or why not
txt_Password.Text = passWord;
?
Upvotes: 2