Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

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\nac.org.kh\wwwroot\kh\ViewArticleDetail.aspx.cs    Line: 13

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +13033687
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +122
   System.Int32.Parse(String s) +26
   ViewArticleDetail.GetUrl(String rout_name, Object ContID) in e:\hostingspaces\vithya\nac.org.kh\wwwroot\kh\ViewArticleDetail.aspx.cs:13
   ViewArticleDetail.ddlArtID_DataBound(Object sender, EventArgs e) in e:\hostingspaces\vithya\nac.org.kh\wwwroot\kh\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