outside updatepanel textbox value change

3 posts, 0 answers
  1. Mugil
    Mugil avatar
    21 posts
    Member since:
    Mar 2013

    Posted 03 Dec 2013 Link to this post

     
    Hi ,

            I have two textbox in my apllication.

           One is inside updatepanel and another  one is outside of update panel.

           My need is when change the  textbox value which is inside update panel i want to increment the     count of textbox automatically which i have outside of update panel.

           Note:I just mentioned textbox as your reference.it may be dropdownlist  or any other controls in updatepanel but outside of updatepanel im having  textbox only.



    with regards,
    Mugil
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Dec 2013 Link to this post

    Hi Mugli,

    Please have a look into the following code snippet to achieve your scenario.

    ASPX:
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <telerik:RadTextBox ID="RadTextBox1" runat="server" ClientEvents-OnValueChanging="ChangeTextBoxValue">
            </telerik:RadTextBox>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:Label Text="TextBox Count:" runat="server">
    </asp:Label>
    <telerik:RadTextBox ID="RadTextBox2" runat="server" Text="0">
    </telerik:RadTextBox>

    JavaScript:
    <script type="text/javascript">
        function ChangeTextBoxValue(sender, args) {
            var text = $find("<%=RadTextBox2.ClientID %>");
            text.set_value(parseInt(text.get_value()) + 1);
        }
    </script>

    Hope this will helps you.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mugil
    Mugil avatar
    21 posts
    Member since:
    Mar 2013

    Posted 05 Dec 2013 Link to this post

    Hi Shinu,

              Thanks for your reply its working for me.



    Regards,
    P.Mugil
Back to Top