我在触发UpdatePanel后调试我的ASP.NET web应用程序时遇到以下错误:

htmlfile:未知运行时错误
并且在ScriptResource.axd文件中突出显示"updatePanelElement.innerHTML=rendering“。
发布于 2009-01-13 22:15:04
这似乎是因为我的UpdatePanel位于有序列表容器中。我在UpdatePanel的ContentTemplate中有列表项标记。
<ol>
<li>...</li>
<asp:UpdatePanel ...>
<ContentTemplate>
<li id="lione" runat="server">...</li>
<li id="litwo" runat="server">...</li>
</ContentTemplate>
<Triggers>
...
</Triggers>
</asp:UpdatePanel>
<li>...</li>
</ol>这对我来说是有意义的,但我想我需要重新考虑我的页面布局。
发布于 2009-10-22 00:01:00
我也遇到过同样的问题。在我的案例中,Page (Table)没有正确设计。以下是我的场景中的问题详细信息:
<table>
<tr>
<td>
<asp:Label id="Lb1" runat="server"/>
</td>
</tr>
<asp:UpdatePanel id="UP1" runat="server">
<ContentTemplate>
<!-- controls in Update Panel-->
</ContentTemplate>
</asp:UpdatePanel>
<tr>
<td>
<asp:Button id="btn" OnClick="btn_Click" runat="server"/>
</td>
</tr>
</table>我已更改为
<table>
<tr>
<td>
<asp:Label id="Lb1" runat="server"/>
</td>
</tr>
**<tr>
<td>**
<asp:UpdatePanel id="UP1" runat="server">
<ContentTemplate>
<!-- controls in Update Panel-->
</ContentTemplate>
</asp:UpdatePanel>
**</td>
</tr>**
<tr>
<td>
<asp:Button id="btn" OnClick="btn_Click" runat="server"/>
</td>
</tr>
</table>已解决将更新面板移入另一个表行的问题。因此,我坚信适当的屏幕设计应该能解决这类问题。
发布于 2009-10-08 14:47:51
感谢上面的解释-我找到了一个解决方案,通过使用需要由事件更新的li包装UpdatePanel。希望这能有所帮助。
例如:
<li>
<asp:UpdatePanel runat="server" ID="UpdatePanelCustInfo" UpdateMode="Conditional" RenderMode="Inline">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlCountry" />
</Triggers>
<ContentTemplate>
<label>State:</label>
<asp:DropDownList ID="ddlStateProvince" AutoPostBack="False" runat="server" CssClass="adminInput">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</li>https://stackoverflow.com/questions/441038
复制相似问题