AJAX - 类型“System.Web.UI.UpdatePanel”不具有名为“FileUpload”的公共属性。
类型“system.web.ui.updatepanel” 不具有名为“***”的公共属性,
其实原因很简单。就是少了一个<ContentTemplate></ContentTemplate>
“
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:DropDownList ID="ddlUsed" runat="server">
<asp:ListItem Text="百度" Value="-1"></asp:ListItem>
<asp:ListItem Text="谷歌" Value="0"></asp:ListItem>
<asp:ListItem Text="新浪" Value="1"></asp:ListItem>
</asp:DropDownList>
</asp:UpdatePanel>
”
正确的如下:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
asp:DropDownList ID="ddlUsed" runat="server">
<asp:ListItem Text="百度" Value="-1"></asp:ListItem>
<asp:ListItem Text="谷歌" Value="0"></asp:ListItem>
<asp:ListItem Text="新浪" Value="1"></asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
posted on 2015-07-30 14:06 ultrastrong 阅读(237) 评论(0) 收藏 举报
浙公网安备 33010602011771号