2012-01-02 146 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