Get (Retrieve) TextBox value inside UserControl using jQuery in ASP.Net

Last Reply 7 months ago By arunkurmi

Posted 7 months ago

How to get the value of textbox and any other control which is define inside user contral by using jquery

You are viewing reply posted by: arunkurmi 7 months ago.
Posted 7 months ago Modified on 7 months ago

Hi SajidHussa,

Check this sample. now take its reference.


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs"
    Inherits="WebUserControl" %>
Enter Mobile No :
<input id="txtMobileNo" type="text" placeholder="Enter Your Registered Mobile Number" />


<html xmlns="">
<head runat="server">
    <script type="text/javascript" src=""></script>
    <script type="text/javascript">
        $(function () {
            $("[id*=btnSubmit]").on("click", function () {
                var number = $('[id*=txtMobileNo]').val();
    <form id="form1" runat="server">
        <uc1:UserControl ID="UserControl1" runat="server" />
        <br />
        <asp:Button ID="btnSubmit" Text="Submit" runat="server" />