Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hye all,

Here is my scenario:
- When user click on a button (Change Section button), it causes another button (Submit button) to appear. I need to put the submit button inside updatepanel otherwise the button wud not be displayed when user click change section.
- Now the submit button appears, but when i click submit, this error occurs:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

I have tried change causevalidation to false and add
XML
<Triggers>
           <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" />
       </Triggers>


in update panel properties but neither works. Any other idea how to solve this?

XML
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
   <ContentTemplate>


                 <div id="divSubmit" runat = "server" visible ="false">

                                  <table runat="server" id="tableSubmit" style="width: 53%">
                                      <tr>
                                          <td style="width: 114px">
                                              Select manager</td>
                                          <td style="width: 8px">
                                              :</td>
                                          <td style="width: 183px">
                                              <asp:DropDownList ID="ddlMgr" runat="server" CssClass="txtbox">
                                              </asp:DropDownList>
                                              <asp:Label ID="lblddlMgr" runat="server" Font-Size="11pt"
                                                  Text="Change Resp. Section does not require Manager's Approval" Visible="False"></asp:Label>
                                          </td>
                                      </tr>
                                      <tr>
                                          <td colspan="3">
                                              &nbsp;</td>
                                      </tr>
                                  </table>
                                  <asp:UpdateProgress ID="UpdateProgress4" runat="server" DynamicLayout="False">
                                      <ProgressTemplate>
                                          <div align="center" style="font-weight:bold">
                                              &nbsp;<asp:Image ID="aspImg4" runat="server" Height="16px"
                                                  ImageUrl="~/img/loading_bar.gif" Width="177px" />
                                              Submitting...</div>
                                      </ProgressTemplate>
                                  </asp:UpdateProgress>
                                  <asp:Button ID="btnSubmit" runat="server" CssClass="button" Height="42px"
                                      Text="Resubmit" Width="202px" CausesValidation="False" />
                                  <br />

                 </div>
</ContentTemplate>
       <Triggers>
           <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" />
       </Triggers>
   </asp:UpdatePanel>
Posted

1 solution

 
Share this answer
 
Comments
snamyna 6-Jan-13 21:44pm    
Thanks for the info. I dont really know how to solve the problem using other methods. I just choose the easiest one which is removing all update panel and just do the postback as normal. It just the page would be blinking everytime it postback. Anyway, thanks Sandeep. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900