Re: Dynamically loading user control into Placeholder gives Object reference not set to an instance of an object
- From: "Phoenix" <phoenixjenn@xxxxxxxxx>
- Date: 6 Jun 2005 05:32:37 -0700
I found the problem, i wasn't calling
Page.LoadControL("ucMySectorFilters.ascx") before adding the
control...duh.
Here's the working code (hopefully it will help out someone else!):
Dim mySectorFiltersControl As ucMySectorFilters = New ucMySectorFilters
mySectorFiltersControl =
Page.LoadControl("ucMySectorFilters.ascx")
mySectorFiltersControl.listBoxStyle =
ucMySectorFilters.enlistBoxStyle.ContentPage
PlaceHolder1.Controls.Add(mySectorFiltersControl)
.
- References:
- Prev by Date: Dynamically loading user control into Placeholder gives Object reference not set to an instance of an object
- Next by Date: Re: EditCommandColumn problem!!
- Previous by thread: Dynamically loading user control into Placeholder gives Object reference not set to an instance of an object
- Next by thread: Re: Dynamically loading user control into Placeholder gives Object reference not set to an instance of an object
- Index(es):