Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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
<Triggers>
           <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" />
       </Triggers>
 
in update panel properties but neither works. Any other idea how to solve this?
 
<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 4-Jan-13 20:37pm
snamyna1.2K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
snamyna at 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)



Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 5 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100