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 99:                     Else
Line 100:                        qs = "?" & qs.TrimEnd("&")
Line 101:                        Return Me.Request.RawUrl.Substring(0, Me.Request.RawUrl.IndexOf("?")) & qs
Line 102:                        'Return URL with all parameters except pageindex
Line 103:                    End If

Source File: D:\Webroot\td2k8r2-64\tdcpreview.dytelworld.com\usercontrols\PageList.ascx.vb    Line: 101

Stack Trace:


[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
   System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7499399
   System.String.Substring(Int32 startIndex, Int32 length) +11
   usercontrols_PageList.get_URL() in D:\Webroot\td2k8r2-64\tdcpreview.dytelworld.com\usercontrols\PageList.ascx.vb:101
   usercontrols_PageList.FillPageList() in D:\Webroot\td2k8r2-64\tdcpreview.dytelworld.com\usercontrols\PageList.ascx.vb:265
   categoryvideos.GetCatVideos() in D:\Webroot\td2k8r2-64\tdcpreview.dytelworld.com\categoryvideos.aspx.vb:266
   categoryvideos.Page_Load(Object sender, EventArgs e) in D:\Webroot\td2k8r2-64\tdcpreview.dytelworld.com\categoryvideos.aspx.vb:293
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5491