Server Error in '/' Application.

Value cannot be null.
Parameter name: String

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.ArgumentNullException: Value cannot be null.
Parameter name: String

Source Error:


Line 1298:            if (url.IndexOf("/en/page/") == -1) submenus = false;
Line 1299:            string n = HttpContext.Current.Request["n"];
Line 1300:            st = string.Format("SELECT category FROM PagesEn WHERE ID={0}", Int32.Parse(n));
Line 1301:            string ccat = "";
Line 1302:            using (SqlConnection connection = new SqlConnection(conString))

Source File: e:\inetpub\vhosts\nilco.ir\httpdocs\App_Code\utilityNilco.cs    Line: 1300

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: String]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12937821
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +120
   System.Int32.Parse(String s) +24
   nilco.App_Code.utilityNilco.ShowSideBarEn() in e:\inetpub\vhosts\nilco.ir\httpdocs\App_Code\utilityNilco.cs:1300
   ASP.nilco_en_news_archives_default_aspx.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in e:\inetpub\vhosts\nilco.ir\httpdocs\nilco\en\news\archives\Default.aspx:126
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +9824004
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1303


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