selva kumar

selva kumar

  • NA
  • 557
  • 188.7k

Updatepanel does not working on second click.

Oct 17 2013 3:32 AM
Hi friends in my contact us page i m using updatepanel.when i clicking button it will store the details in database.on first time button click it is working fine.on second click the update panel does not working..can anyone help me out..here is my source...

<asp:UpdatePanel id="UpdatePanel1" UpdateMode="Conditional" runat="server">
  <contenttemplate>
  <div class="form">
  <form action="#">
  <div class="fields">
  <div style="WIDTH: 178px; HEIGHT: 55px" class="column">
  <p class="label">Name<span>
  <asp:RequiredFieldValidator id="rfv1" runat="Server" ErrorMessage="*" ControlToValidate="txtname">
  </asp:RequiredFieldValidator>
  </span>
  </p>
  <p><span></span></p>
  <div style="WIDTH: 180px" id="DIV1">
  <asp:TextBox id="txtname" runat="server" Height="30px" Width="175px">
  </asp:TextBox></div></div>
  <div style="WIDTH: 178px; HEIGHT: 57px" class="column">
  <p class="label">E-mail<span>
  <asp:RequiredFieldValidator id="rfv2" runat="Server" ErrorMessage="*" ControlToValidate="txtmail">
  </asp:RequiredFieldValidator>
  <asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ErrorMessage="*" ControlToValidate="txtmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></span></p><p><span></span></p>
  <div style="WIDTH: 180px">
  <asp:TextBox id="txtmail" runat="server" Height="30px" Width="175px"></asp:TextBox></div></div>
  <div style="WIDTH: 181px; HEIGHT: 9px" class="column">
  <p class="label">Subject</p><p><span></span></p>
  <div style="WIDTH: 180px">
  <asp:TextBox id="txtsubject" runat="server" Height="30px" Width="180px"></asp:TextBox></div></div></div>
  <p class="label">Message<span>
  <asp:RequiredFieldValidator id="rfv3" runat="Server" ErrorMessage="*" ControlToValidate="txtmessage">
  </asp:RequiredFieldValidator></span></p><p><span></span></p>
  <div style="WIDTH: 93%; HEIGHT: 146px" id="DIV2">
  <asp:TextBox id="txtmessage" runat="server" Height="130px" Width="577px" TextMode="MultiLine">
  </asp:TextBox></div>
  <asp:Button id="btnSubmit" onclick="btnSubmit_Click" runat="server" text="Send Message" CssClass="general_button blue"></asp:Button>
  <asp:Label style="Z-INDEX: 100; LEFT: 58px; POSITION: absolute; TOP: 893px" id="Label1" runat="server" Visible="False" Text="Label"></asp:Label>
  <asp:Label id="Label2" runat="server" Width="436px" Visible="False" Text="Label" Font-Bold="True" ForeColor="DarkGreen"></asp:Label>
  </form>
  </div>
  </contenttemplate> 
  <Triggers>
  <asp:AsyncPostBackTrigger  ControlID="btnSubmit" EventName="Click"/>
  </Triggers>
  </asp:UpdatePanel>