Thursday, February 2

Select all text in textbox on click.

You can do it in the client side it self.
Just try this...
<asp:TextBox ID="txt1" runat="server" Text="Abc" onfocus="javascript:this.select();" ></asp:TextBox>
otherwise if you want to do it in the code behind
write
txt1.Attributes.Add("onfocus","javascript:this.select();");
this in your page load event.


Thanks shibashish mohanty

No comments:

Post a Comment

Please don't spam, spam comments is not allowed here.

.

ShibashishMnty
shibashish mohanty