Server Error in '/' Application.

DataTable must be set prior to using DataView.

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.Data.DataException: DataTable must be set prior to using DataView.

Source Error:


Line 78:     'Dim FullDataView As New DataView(Cache("cacheCONTENTPICS"))
Line 79:     Dim myDataView As New DataView(Cache("cacheCONTENTPICS"))
Line 80: 	 myDataView.Sort = ("TimePosted Desc, ID desc")
Line 81:     myDataView.RowFilter = ("linx = '" & linx & "'")
Line 82: 	if myDataView.Count = 0 then go404()

Source File: D:\sites\dailyhaha-2015\404s\pictures.aspx    Line: 80

Stack Trace:


[DataException: DataTable must be set prior to using DataView.]
   System.Data.DataView.CheckSort(String sort) +2216468
   System.Data.DataView.set_Sort(String value) +164
   ASP._404s_pictures_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\sites\dailyhaha-2015\404s\pictures.aspx:80
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4239


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