My code looks like this:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnAddIsotope" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:gridview id="gwResults" runat="server">
'all gridview columns go here
</asp:gridview>
<asp:ObjectDataSource here>
<asp:Panel id="pnlAddIso" runat="server">
<asp:Textbox ID="txtIsoDate" runat="server" />
<asp:Button ID="btnAdd" Text="Add " CssClass="button" runat="server" />
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
when i click the button, its supposed to add an item fromt he txtIsoDate into the database and refresh the gridview.
it adds fine, but when it comes back it creates another copy of my pnlAddIso.
why is this happening? i'm so confused. please help.
if im my button i write pnlAddIso.visible=false, the new duplicate panel does not appear, but the old one does not work anymore....
I had the same problem but did not have any tables, what I did find were unclosed div tags, removed and fixed my problem
I was also experiencing this issue and, as Servy said, the issue seemed to be related to tables. It wasn't consistent on every page.
The first thing I tries was to update the AjaxControlToolkit with NuGet.
In my case, a table encapsulated the update panel.
<table>
<asp:updatepanel .../>
</table>
I would look at your control or page, and check if any structure is being interrupted by anb update panel in this manner.
The issue was in tables.
I removed all table tags and now it works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With