返回首页

如何绑定下拉使用Array:我有一个问题。我想使用一个字符串数组绑定到一个下拉。我使用的是从另一个页面调用的会议。会议工作正常,现在的问题是,当我绑定下拉它抛出一个错误..

DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Name'

{C}错误:System.String'的不包含一个名为"DRIVER_NAME"的属性。

回答

评论会员:。devbtl 时间:2012/02/04
Vivek Thanx ..它的工作原理......宾果老兄
评论会员:arunrv下 时间:2012/02/04
string[] a = new string[] {"Arun","vinay","Manju","Pavan" };

        DropDownList1.DataSource = a.ToArray();

        DropDownList1.DataBind();
的 检查了这一点