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 115:        cmd.Connection = conn;
Line 116:        cmd.CommandText = "Select ContentId FROM CMS_Contents where ContentTitle=@p1";
Line 117:        cmd.Parameters.Add("@p1", Page.RouteData.Values["ContentTitle"].ToString().Replace("-", " "));
Line 118:        da.SelectCommand = cmd;
Line 119:        da.Fill(ds, "CMS_Contents");

Source File: e:\Data\sanadcomjo\Controls\BreadCrumb.ascx.cs    Line: 117

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Controls_BreadCrumb.CheckQueryString() in e:\Data\sanadcomjo\Controls\BreadCrumb.ascx.cs:117
   Controls_BreadCrumb.Page_Load(Object sender, EventArgs e) in e:\Data\sanadcomjo\Controls\BreadCrumb.ascx.cs:19
   System.Web.UI.Control.OnLoad(EventArgs e) +98
   System.Web.UI.Control.LoadRecursive() +153
   System.Web.UI.Control.LoadRecursive() +250
   System.Web.UI.Control.LoadRecursive() +250
   System.Web.UI.Control.LoadRecursive() +250
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4076


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9224.0