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 147:                else
Line 148:                {
Line 149:                    lnkObject.linkID = Convert.ToInt16(p_var.PageID.Remove(0, 6));
Line 150:                }
Line 151:            }

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

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:149
   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