System.NullReferenceException

Object reference not set to an instance of an object.

Exception source: System.Web

Exception string:

System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.UI.WebControls.PagedDataSource.GetEnumerator() at System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at Controls_Portals_2_usercontrols_gallery_gallery.loadGallery(String t, String id) in D:\Websites\Caracole\Staging\Portal\controls\portals\2\usercontrols\gallery\gallery.ascx.vb:line 266 at Controls_Portals_2_usercontrols_gallery_gallery.Page_Load(Object sender, EventArgs e) in D:\Websites\Caracole\Staging\Portal\controls\portals\2\usercontrols\gallery\gallery.ascx.vb:line 32 at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Object reference not set to an instance of an object.

Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 264:            Me.pnlPage.Visible = False
Line 265:            Me.dlGallery.DataSource = objPds
Line 266:            Me.dlGallery.DataBind()
Line 267:            Me.pnlAll.Visible = True
Line 268:            imgViewAll.Visible = False

Source File: D:\Websites\Caracole\Staging\Portal\controls\portals\2\usercontrols\gallery\gallery.ascx.vb    Line: 266

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   System.Web.UI.WebControls.PagedDataSource.GetEnumerator() +244
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +840
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +173
   Controls_Portals_2_usercontrols_gallery_gallery.loadGallery(String t, String id) in D:\Websites\Caracole\Staging\Portal\controls\portals\2\usercontrols\gallery\gallery.ascx.vb:266
   Controls_Portals_2_usercontrols_gallery_gallery.Page_Load(Object sender, EventArgs e) in D:\Websites\Caracole\Staging\Portal\controls\portals\2\usercontrols\gallery\gallery.ascx.vb:32
   System.Web.UI.Control.LoadRecursive() +70
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3177