Server Error in '/' Application.

Length cannot be less than zero.
Parameter name: length

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.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length

Source Error:


Line 2099:                }
Line 2100:                i2 = mer.ToLowerInvariant().LastIndexOf('x');
Line 2101:                lblmeas2.Text = mer.Substring(0, i1);
Line 2102:                lblmeas3.Text = mer.Substring(i1 + 1, i2 - i1 - 1);
Line 2103:                lblmeas4.Text = mer.Substring(i2 + 1, mer.Length - i2 - 1);

Source File: c:\inetpub\wwwroot\Websites\HungphatUsa.com\fancydetail.aspx.cs    Line: 2101

Stack Trace:


[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
   System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +10434472
   AspDotNetStorefront.fancydetail.bind() in c:\inetpub\wwwroot\Websites\HungphatUsa.com\fancydetail.aspx.cs:2101
   AspDotNetStorefront.fancydetail.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Websites\HungphatUsa.com\fancydetail.aspx.cs:679
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8974