This is a migrated thread and some comments may be shown as answers.

outside updatepanel textbox value change

2 Answers 276 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mugil
Top achievements
Rank 1
Mugil asked on 03 Dec 2013, 10:22 PM
 
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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Dec 2013, 03:10 AM
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.
0
Mugil
Top achievements
Rank 1
answered on 05 Dec 2013, 04:22 PM
Hi Shinu,

          Thanks for your reply its working for me.



Regards,
P.Mugil
Tags
General Discussions
Asked by
Mugil
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mugil
Top achievements
Rank 1
Share this question
or