Steps:
Take one textbox & set its TextMode to password.
now go to source mode of visual studio write this in the textbox
onfocus="if(this.value =='PASSWORD')this.value='';" onblur="if(this.value==''){this.value='PASSWORD';this.TextMode='SingleLine';}"After adding this what happens is .....
It will initially show text "PASSWORD".
After that when you click on it ..it will be converted password textbox which will show text as "*"
your textbox markup should look something like this....
< asp:TextBox ID="Password" runat="server" TextMode="Password"
onfocus="if(this.value =='PASSWORD')this.value='';" onblur="if(this.value==''){this.value='PASSWORD';this.TextMode='SingleLine';}">PASSWORD< /asp:TextBox>
0 comments:
Post a Comment