Amol

Amol

  • NA
  • 208
  • 194.1k

Problem update panel event fires twice

Nov 11 2011 12:27 AM
here update panel event fires twice as i clicked on button
and record inserted twice why it is happening donno
 
please help 
 

 


 Collapse | Copy Code
<asp:UpdatePanel ID="upanelfolder" runat="server" UpdateMode="Conditional"> <ContentTemplate><asp:Label ID="Label1" runat="server" Text= <%=prod_name %>
 Collapse | Copy Code
</ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btn" EventName="Click" /> </Triggers> </asp:UpdatePanel> 

<asp:Button ID="btn" runat="server" OnClick="btn_Click" Text="Add" />
 
code behind

 Collapse | Copy Code
Protected Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click //insert query End Sub

Answers (2)