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 18:                 if (!id.Contains("?"))
Line 19:                 {
Line 20:                     Int32 idString = Convert.ToInt32(id.Remove(id.Length - 5));
Line 21: 
Line 22:                     //String idString = path.Substring(path.LastIndexOf('/') + 1, path.Length - path.LastIndexOf('_') - 6);

Source File: d:\inetpub\vhosts\cartraja.com\sringaar.in\Global.asax    Line: 20

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7687783
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
   System.Convert.ToInt32(String value) +63
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in d:\inetpub\vhosts\cartraja.com\sringaar.in\Global.asax:20
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.9174; ASP.NET Version:2.0.50727.9175