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 74:         Dim SubGroup = New SubGroup(CType(SeriesGroups(0).SubGroupID, Guid), _Language.ID)
Line 75: 
Line 76:         Literal_SubGroupName.Text = SubGroup.Name.SubString(0, SubGroup.Name.IndexOf(" - "))
Line 77:         Literal_SubGroupDescription.Text = SubGroup.Name.SubString(SubGroup.Name.IndexOf(" - ") + 3)
Line 78: 

Source File: D:\inetpub\wwwroot\wallensteinequipment_com\Web\print.aspx    Line: 76

Stack Trace:


[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +382
   ASP.print_aspx.Page_Load(Object sender, EventArgs e) in D:\inetpub\wwwroot\wallensteinequipment_com\Web\print.aspx:76
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082


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