Clearing a Password text box in ASP.NET -


i have 2 boxes 1 username [text] , 1 password [password].

i'm using code in codebehind:

  protected void button2_click1(object sender, eventargs e)     {         textbox1.text = "";         textbox2.text = "";     } 

[asp.net/html]

<asp:textbox id="textbox2" runat="server" height="24px" style="text-align: center" width="209px" textmode="password"></asp:textbox> 

the first text box clears second doesn't. there special way in asp.net?

hi don't know happend in html wrote this:

<asp:textbox id="textbox1" runat="server" ></asp:textbox>     <asp:textbox id="textbox2" runat="server" height="24px" style="text-align: center" width="209px" textmode="password"></asp:textbox>     <asp:button id="button1" runat="server" text="button" onclick="button1_click" /> 

and codebehind:

protected void button1_click(object sender, eventargs e)         {             textbox1.text = "";             textbox2.text = "";         } 

and works, thing when button not have onclick clean password texbox, check , maybe problem.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -