IListSource 不包含任何数据源, 求解 急急!!!
IListSource 不包含任何数据源。说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Web.HttpException: IListSource 不包含任何数据源。
源错误:
行 19: {
行 20: this.dgNews.DataSource = db.userPei();
行 21: dgNews.DataBind();
行 22: this.GV1.DataSource = db.news();
行 23: GV1.DataBind();
源文件: d:\wwwroot\hunanzhongrui\wwwroot\index.aspx.cs 行: 21
堆栈跟踪:
[HttpException (0x80004005): IListSource 不包含任何数据源。]
System.Web.UI.DataSourceHelper.GetResolvedDataSource(Object dataSource, String dataMember) +8657634
System.Web.UI.WebControls.ReadOnlyDataSource.System.Web.UI.IDataSource.GetView(String viewName) +41
System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +128
System.Web.UI.WebControls.DataBoundControl.GetData() +4
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +60
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
System.Web.UI.WebControls.GridView.DataBind() +4
index.Page_Load(Object sender, EventArgs e) in d:\wwwroot\hunanzhongrui\wwwroot\index.aspx.cs:21
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
网上找了半天也没找到解决办法,请高手帮忙! --------------------编程问答-------------------- db.userPei()是个什么东西??? --------------------编程问答-------------------- db.userPei(); 这个方法有问题
补充:.NET技术 , ASP.NET