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 137:            if (Lang_id.ToString() == "1")
Line 138:            {
Line 139:                lnkObject.linkID = Convert.ToInt16(p_var.PageID);
Line 140:            }
Line 141:            else

Source File: g:\iimc\ContentPage.aspx.cs    Line: 139

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14778099
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +172
   System.Int16.Parse(String s, NumberStyles style, NumberFormatInfo info) +25
   System.Convert.ToInt16(String value) +60
   ContentPage.display() in g:\iimc\ContentPage.aspx.cs:139
   ContentPage.Page_Load(Object sender, EventArgs e) in g:\iimc\ContentPage.aspx.cs:89
   System.Web.UI.Control.OnLoad(EventArgs e) +103
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3811


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