My code is as follows:
<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, it should add the element from txtIsoDate to the database and update the gridview.
he adds a penalty, but when he returns, he creates another copy of my pnlAddIso.
Why is this happening? I am very puzzled. 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.
source share