M
Mike
Hi. I'm trying to add a System.Web.UI.UserControl (Not a
System.Web.UI.WebControl) to an asp.net ajax tabpanel.
Unfortunately it doesn't appear that this is possible. This question could
get very detailed, but I'll keep it short. I have a subroutine shown below
which adds a tabpanels to a tabcontainer(Tabs1) based for each object in a
collection. Then for each tabpanel I try to add a usercontrol named
uWebPage. But when the Page_Load event for uWebPage fires I get null
reference exceptions when referencing controls on uWebpage.
Is this situation I'm trying (adding usercontrol to tabpanel) even possible?
Thanks!
------------------------------------------------------------------------------
Dim oNewTab As AjaxControlToolkit.TabPanel
Dim uWebpage As uWebpage
For Each oAssociation As UserVideoAssociation In oAssociations
For Each oWebpage As Webpage In oAssociation.Webpages
oNewTab = New AjaxControlToolkit.TabPanel
uWebpage = New uWebpage
uWebpage.DomainName = oAssociation.DomainName
uWebpage.Webpage = oWebpage.Webpage
oNewTab.Controls.Add(uWebpage)
oNewTab.HeaderText = oWebpage.Webpage
Tabs1.Tabs.Add(oNewTab)
Next
Next
------------------------------------------------------------------------------
System.Web.UI.WebControl) to an asp.net ajax tabpanel.
Unfortunately it doesn't appear that this is possible. This question could
get very detailed, but I'll keep it short. I have a subroutine shown below
which adds a tabpanels to a tabcontainer(Tabs1) based for each object in a
collection. Then for each tabpanel I try to add a usercontrol named
uWebPage. But when the Page_Load event for uWebPage fires I get null
reference exceptions when referencing controls on uWebpage.
Is this situation I'm trying (adding usercontrol to tabpanel) even possible?
Thanks!
------------------------------------------------------------------------------
Dim oNewTab As AjaxControlToolkit.TabPanel
Dim uWebpage As uWebpage
For Each oAssociation As UserVideoAssociation In oAssociations
For Each oWebpage As Webpage In oAssociation.Webpages
oNewTab = New AjaxControlToolkit.TabPanel
uWebpage = New uWebpage
uWebpage.DomainName = oAssociation.DomainName
uWebpage.Webpage = oWebpage.Webpage
oNewTab.Controls.Add(uWebpage)
oNewTab.HeaderText = oWebpage.Webpage
Tabs1.Tabs.Add(oNewTab)
Next
Next
------------------------------------------------------------------------------