Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 49:         {
Line 50:             model =ProductsInfoDAL.SelectOne(int.Parse(Request.QueryString["id"]));
Line 51:             proclass = ProductsClassDAL.SelectOne(Suffix.And.Equal(ProductsClass.id, model.Productclassid).ToString());
Line 52:             ProductsInfo model1 = ProductsInfoDAL.SelectOne("where id>" + Request.QueryString["id"] + " and ProductClassID=" + model.Productclassid + " order by orderid asc");
Line 53:             ProductsInfo model2 = ProductsInfoDAL.SelectOne("where id<" + Request.QueryString["id"] + " and ProductClassID=" + model.Productclassid + "  order by orderid desc");

Source File: f:\usr\localuser\qxw1590990471\Controls\Pro\ProductView.ascx.cs    Line: 51

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Controls_Product_ProductView.Page_Load(Object sender, EventArgs e) in f:\usr\localuser\qxw1590990471\Controls\Pro\ProductView.ascx.cs:51
   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.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.8669; ASP.NET Version:2.0.50727.5491