Getting Textbox value using jquery in Asp.Net

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 284
Write below jQuery code:-
Include jQuery Library as:-
<script src = "/javascript/jquery-1.3.2.js" type = "text/javascript"></script>
<script type="text/javascript">
$(function()
{
$("#<%= btnGetValue.ClientID %>").click(function()
{
alert($("#<%= txtname.ClientID %>").val());
return true;
});
});
</script>
<asp:TextBox ID = "txtname" runat = "server"></asp:TextBox>
<asp:Button ID = "btnGetValue" runat = "server" Text = "Get Value" />

Comments or Responses

Login to post response