2012-01-02 107 views
0

我收到了javascript中的下述错误。ASP.net错误。更新面板

<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> 

我不能够理解为什么这个错误是未来:当我尝试CAL按钮更新面板中点击

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的代码时出现此错误?任何人都可以帮我理清这个问题吗?

回答

1

我相信不正确的aspx标记导致解析器错误。检查UpdateMode=Conditional

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

+0

已经使用Response.Write() – Ishan 2012-01-02 11:21:19