Server Error in '/news' 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 83:             for (int j = 0; j < value.Length; j++)
Line 84:             {
Line 85:                 if (int.Parse(list[i]) == value[j])
Line 86:                 {
Line 87:                     return int.Parse(list[i]);

Source File: c:\globes\wwwroot\news\harel\uc\wuc_menu.ascx.cs    Line: 85

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +288
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +180
   harel_uc_wuc_menu.isInList(Int32[] value, String[] list) in c:\globes\wwwroot\news\harel\uc\wuc_menu.ascx.cs:85
   harel_uc_wuc_menu.Page_Load(Object sender, EventArgs e) in c:\globes\wwwroot\news\harel\uc\wuc_menu.ascx.cs:29
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Control.LoadRecursive() +251
   System.Web.UI.Control.LoadRecursive() +251
   System.Web.UI.Control.LoadRecursive() +251
   System.Web.UI.Control.LoadRecursive() +251
   System.Web.UI.Control.LoadRecursive() +251
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4740


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