生日密码:1月1日报错
Server Error in '/' Application.
--------------------------------------------------------------------------------
C_Msg
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Server Error in '/' Application.
--------------------------------------------------------------------------------
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'content'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'content'.
Source Error:
Line 19: </HeaderTemplate>
Line 20: <ItemTemplate>
Line 21: <asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "content").ToString().Trim() %>' runat="server" ID="Label2"/>
Line 22: </ItemTemplate>
Line 23: </asp:TemplateColumn>
Server Error in '/' Application.
--------------------------------------------------------------------------------
A field or property with the name 'strID' was not found on the selected data source.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A field or property with the name 'strID' was not found on the selected data source.
Source Error:
Line 73: {
Line 74: MyDataGrid.DataSource = nc.SelectNewsContent();
Line 75: MyDataGrid.DataBind();
Line 76: ShowStats();
Line 77:
[HttpException (0x80004005): A field or property with the name 'strID' was not found on the selected data source.]
System.Web.UI.WebControls.BoundColumn.OnDataBindColumn(Object sender, EventArgs e) +1778861
System.Web.UI.Control.OnDataBinding(EventArgs e) +99
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +206
System.Web.UI.Control.DataBind() +12
System.Web.UI.Control.DataBindChildren() +216
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +216
System.Web.UI.Control.DataBind() +12
System.Web.UI.WebControls.DataGrid.CreateItem(Int32 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) +200
System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) +1519
System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +56
System.Web.UI.WebControls.BaseDataList.DataBind() +72
ContentList.BindGrid() in d:\webhost\xuni123\web\ContentList.aspx.cs:75
ContentList.Page_Load(Object sender, EventArgs e) in d:\webhost\xuni123\web\ContentList.aspx.cs:33
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
Server Error in '/' Application.
--------------------------------------------------------------------------------
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'strName'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'strName'.
Source Error:
Line 17: </HeaderTemplate>
Line 18: <ItemTemplate>
Line 19: <asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "strName").ToString().Trim() %>' runat="server" ID="Label2"/>
Line 20: </ItemTemplate>
Line 21: </asp:TemplateColumn>
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42