C# 下拉列表未绑定
我在asp页面中有一个下拉列表,我将其绑定到codebehind中C# 下拉列表未绑定,c#,.net,asp.net,C#,.net,Asp.net,我在asp页面中有一个下拉列表,我将其绑定到codebehind中 <asp:DropDownList ID="authorList" runat="server"></asp:DropDownList> 其中PublishingCompanyEntities是使用ADO.NET实体模型获得的实体类。但是,dropdownlist没有绑定。您能告诉我我犯了什么错误吗?分配数据源属性后,尝试调用下拉列表中的方法: authorList.DataBind(); 与Win
<asp:DropDownList ID="authorList" runat="server"></asp:DropDownList>
其中PublishingCompanyEntities是使用ADO.NET实体模型获得的实体类。但是,dropdownlist没有绑定。您能告诉我我犯了什么错误吗?分配数据源属性后,尝试调用下拉列表中的方法:
authorList.DataBind();
与WinForms相反,在ASP.NET中,您需要显式调用此方法。在分配数据源
属性后,尝试在下拉列表中调用此方法:
authorList.DataBind();
与WinForms相反,在ASP.NET中,您需要显式调用此方法。我没有看到对authorList.DataBind()的调用代码>我没有看到对authorList.DataBind()的调用代码>