Sunday, February 24, 2013

Click and Highlight Text in a ASP.NET TextBox using jQuery

.aspx MarkUp:

<div class="smallDiv">
<h2>Click in the text box to select all the text automatically</h2>
<asp:TextBox ID="tb1" runat="server" Text="Click Here to Select"/>
Tip: If you do not click and just start typing into textbox,
the effect does not show up

Jquery Script:
<script src=""></script>
<script type="text/javascript">
$(function() {
$('input[id$=tb1]').click(function() {

No comments:
Write comments
Recommended Posts × +