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 11:     protected string GetUrl(string rout_name, object ContID)
Line 12:     {
Line 13:         int Cont_ID = int.Parse(ContID.ToString());
Line 14:         RouteValueDictionary parameters = new RouteValueDictionary { { "ContID", Cont_ID } };
Line 15:         return Page.GetRouteUrl(rout_name, parameters);

Source File: e:\hostingspaces\vithya\apa2017\ViewArticleDetail.aspx.cs    Line: 13

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ViewArticleDetail.GetUrl(String rout_name, Object ContID) in e:\hostingspaces\vithya\apa2017\ViewArticleDetail.aspx.cs:13
   ViewArticleDetail.ddlArtID_DataBound(Object sender, EventArgs e) in e:\hostingspaces\vithya\apa2017\ViewArticleDetail.aspx.cs:51
   System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +109
   System.Web.UI.WebControls.ListControl.PostPerformDataBindingAction() +65
   System.Web.UI.WebControls.ListControl.PerformSelect() +46
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +76
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +114
   System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +23
   System.Web.UI.Control.PreRenderRecursiveInternal() +90
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +906


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