Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 29, 2009 06:51 PM by vvettiya
Jan 09, 2009 05:57 AM|LINK
I have a masked edit control bounded to a currency textbox, I want to select all the text on click event of the textbox. I tried the following on form load event
But its not working for some reason, any clue guys ?
Jan 09, 2009 08:09 AM|LINK
ignore the warning of VS this works
Jan 09, 2009 08:12 AM|LINK
You can do it in the client side it self.
Just try this...
otherwise if you want to do it in the code behind
this in your page load event.
Jan 09, 2009 08:26 AM|LINK
Jan 09, 2009 08:28 AM|LINK
try this script...
).focus(); document.getElementById(Id).select();}</script>Input TextBox:<br><asp:TextBox id="txtfld" runat="Server" onClick="SelectAll('txtfld');"/>
Jan 13, 2009 05:01 AM|LINK
Thanks for the replies guys. The above solutions dont work at all with the textbox bound to masked edit, they do work perfect with the simple textbox. My requirement is to select all text on click which is bound to a masked edit control.
<asp:TextBox id="txtTrtLimit" runat="server" ></asp:TextBox> <cc1:MaskedEditExtender id="MaskedEditExtender4" runat="server" TargetControlID="txtTrtLimit" MaskType="Number" Mask="999,999,999,999,999" AutoComplete="False" InputDirection="RightToLeft"
Any clue guys ?
Jan 13, 2009 05:11 AM|LINK
what issues are you facing it that??
Jan 13, 2009 05:16 AM|LINK
It wont select all the text inside the textbox when its bound to the masked edit with the above solutions. I want to actually let the users have ease in editing the values inside the textbox.
Jan 13, 2009 05:33 AM|LINK
Did you try my code And did it give you an error??
Remeber one thing when the page is rendered there are no asp controls only html controls are there.
Jan 13, 2009 06:25 AM|LINK
Hi Mudassir I tried your code its not working with the textbox bind to masked edit.
Any clues ?