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 27:         if (arrURLBreakdown.Length == 2)
Line 28:         {
Line 29:             iYear = System.Convert.ToInt32(arrURLBreakdown[0]);
Line 30:         }
Line 31:         else if (arrURLBreakdown.Length == 3)

Source File: c:\inetpub\vhosts\edwinstree.herts.sch.uk\httpdocs\template.aspx    Line: 29

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14524712
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +172
   System.Convert.ToInt32(String value) +60
   ASP.template_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\vhosts\edwinstree.herts.sch.uk\httpdocs\template.aspx:29
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8753


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