Share via


Textbox Textchanged event is not firing when textbox is inside updatepanel

Question

Saturday, May 7, 2011 8:39 AM

  <asp:UpdatePanel ID="UpdatePension" runat="server">
                <ContentTemplate>

 <td>
                        <asp:Label ID="lbl_dr" runat="server" CssClass="style5" Text="DR"></asp:Label>
                    </td>
                    <td class="style5">
                        <asp:TextBox ID="txt_dr" runat="server" AutoPostBack="true" OnTextChanged="txt_dr_TextChanged1" EnableViewState="false" ></asp:TextBox>
                       
                    </td>

</ContentTemplate>

</asp:UpdatePanel>

 

All replies (6)

Friday, May 13, 2011 2:26 AM âś…Answered

hi divyajsinha,

thanks for your post.

Here is a similar post which explain why textbox change event is not fired for textbox that inside updatepanel, please refer:

http://stackoverflow.com/questions/1009086/how-to-make-an-asp-net-textbox-fire-its-ontextchanged-event-fire-in-an-ajax-upda

hope this helps, thanks.


Saturday, May 7, 2011 8:52 AM

Hi,

Same code works fine on my side. Remember that OnTextChanged event fire when textbox lost the focus ( not for each keyup/keypdown).

Thanks

-Akhtar


Monday, May 9, 2011 12:59 AM

ii's working fine with one textbox but in this case..it's not firing the textchanged event

 


Monday, May 9, 2011 8:09 AM

Try removing EnableViewState="false


Tuesday, May 24, 2011 8:14 AM

I have tried it but it is working fine with onbe text box text changed event and givng problem in other textbox.


Tuesday, May 24, 2011 2:47 PM

Check the textbox property agin to be sure the autopostback property is set to true. you can put a breakpoint on the code behind

to be sure. i encountered same issue one time and later realised i didnt set the autopostback property of the textbox in question.

 

thanks