ASP.net错误。更新面板

时间:2012-01-02 10:56:53

标签: asp.net vb.net updatepanel

我在javascript中收到以下声明的错误。当我尝试按下按钮单击

上的更新面板时,会发生此错误
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'Panel|UpdatePanel1|
    <div id="up'.

这是UpdatePanel代码:

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode=Conditional >
<ContentTemplate>

    <div  style="font-size:10px; font-weight:bold;display:none;" align=center  id="up_div" runat=server  >Apply Flat Rate to all days 
    <asp:TextBox ID="txtflatrate" runat="server" Width=40  ></asp:TextBox>
    <asp:Button ID="btn_apply" runat="server" Text="Go" UseSubmitBehavior=false OnClick="btn_apply_Click" />
    <asp:Table ID="tbl_charges" runat="server" EnableViewState=true>
    </asp:Table>
    Total: <asp:TextBox ID="txtttlrate" runat="server" ReadOnly="True"></asp:TextBox>
    </div>

    <div id="div_norates" runat=server visible=false style ="font-size:11px" class="red_font">
         <font color='red'>
        <center><b>Please make the neccessary changes before <i>creating a booking</i></b></font></CENTER><br/><br/><br/><center>The <i>season </i>for the date period chosen is <i>not set </i><br/> <center> <br/>OR </center> <br/>  The <i>room type </i>for the season is <i>not set</i>. <br/><br/><br/>Make neccessary changes in <i>seasons master</i></center>
    </div>

</ContentTemplate>

<Triggers>
   <asp:AsyncPostBackTrigger ControlID=btn_calc EventName=click />
    <asp:AsyncPostBackTrigger ControlID=btn_apply EventName=click />

</Triggers>
</asp:UpdatePanel>

我无法理解为什么会出现此错误?任何人都可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:1)

我认为aspx标记不正确导致解析器错误。查看UpdateMode=Conditional

如果不是这样,请确保您没有在异步回发中使用Response.Write()(请参阅错误消息)。