我有一个gridview
并且我正在尝试绑定数据:
string id = Request.QueryString["uid"].ToString();
MembershipUser u = Membership.GetUser(new Guid(id));
GridView1.DataSource = Membership.GetUser(u.ProviderUserKey);
GridView1.DataBind();
我收到一个错误:
Data source is an invalid type. It must be either an IListSource,
IEnumerable, or IDataSource.
但我试过:
GridView1.DataSource = Membership.GetAllUsers();
上面的代码ok
我如何gridview
通过ProviderUserKey
类似字符串将数据绑定到