Server Error in '/' Application.

Cannot find column .

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.IndexOutOfRangeException: Cannot find column .

Source Error:


Line 405:            End If
Line 406:            SortExpDirection += " " + ViewState("SortDirection")
Line 407:            dv.Sort = SortExpDirection
Line 408:        End If
Line 409:        If flgDataBind Then

Source File: C:\inetpub\wwwroot\LocalUser\sequel\girobimbi.it\ctlaltrecatg.ascx.vb    Line: 407

Stack Trace:


[IndexOutOfRangeException: Cannot find column .]
   System.Data.DataTable.ParseSortString(String sortString) +2239054
   System.Data.DataView.CheckSort(String sort) +36
   System.Data.DataView.set_Sort(String value) +121
   ctlaltrecatg.CreateSelectQuery(Boolean flgDataBind, Boolean flgSort, Boolean flglastpage) in C:\inetpub\wwwroot\LocalUser\sequel\girobimbi.it\ctlaltrecatg.ascx.vb:407
   ctlaltrecatg.firstload() in C:\inetpub\wwwroot\LocalUser\sequel\girobimbi.it\ctlaltrecatg.ascx.vb:1269
   ElencoStruttura.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\LocalUser\sequel\girobimbi.it\ElencoStruttura.aspx.vb:129
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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