“/”应用程序中的服务器错误。

未将对象引用设置到对象的实例。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。

源错误:


行 307:            if (drv["FieldValue"].ToString() != string.Empty)
行 308:            {
行 309:                lblFieldValue.Text = JwhCommonClass.CommonClass.ReplaceStringToLabel(drv["FieldValue"].ToString());
行 310:            }
行 311:        }

源文件: f:\usr\localuser\byw5921250001\Product\ProductShow.aspx.cs    行: 309

堆栈跟踪:


[NullReferenceException: 未将对象引用设置到对象的实例。]
   Product_ProductShow.gvwProductField_RowDataBound(Object sender, GridViewRowEventArgs e) in f:\usr\localuser\byw5921250001\Product\ProductShow.aspx.cs:309
   System.Web.UI.WebControls.GridView.OnRowDataBound(GridViewRowEventArgs e) +111
   System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +181
   System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +3724
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67
   System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +14
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +123
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
   System.Web.UI.WebControls.GridView.DataBind() +4
   Product_ProductShow.gvwProductField_DataBind(Int32 proid, Int32 sortid) in f:\usr\localuser\byw5921250001\Product\ProductShow.aspx.cs:278
   Product_ProductShow.ProductInfo_DataBind() in f:\usr\localuser\byw5921250001\Product\ProductShow.aspx.cs:147
   Product_ProductShow.Page_Load(Object sender, EventArgs e) in f:\usr\localuser\byw5921250001\Product\ProductShow.aspx.cs:60
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34280
Baidu
sogou