Thursday, October 24, 2013

Jquery to Get TextBox Value in

Leave a Comment
With the help of the jquery code you can get the text being entered inside textbox control.
Jquery val() method is used for this purpose. Below is simple juery code in which on the click of the button I am displaying the text entered in the textbox. 

Jquery to Get Value of Asp.Net TextBox control:

<html xmlns="">
<head runat="server">
    <script src="//"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            $(function () {

                $('#btngettext').click(function (e)
                    var GetValue = $('#txtname').val();


    <form id="form1" runat="server">
            <asp:TextBox runat="server" ID="txtname"></asp:TextBox>
            <asp:Button runat="server" ID="btngettext" Text="Display" />



Post a Comment