Link to home
Start Free TrialLog in
Avatar of Kiterq
Kiterq

asked on

Adding Dynamic User Controls tab panel PlaceHolder

I have a website that has numerous tab panels, each of which contains a PlaceHolder.  My end result would ideally be that as only one tab panel is available for viewing at any one time, that only 1 user control is loaded into the relevent PlaceHolder (ie on the current ActiveTab).  I do not want to load a usercontrol into each PlaceHolder as this will take processing time and is not necessary seeing as only 1 user control is viewable at any one time.  The usercontrol has a formview and a gridview on it.  I know i can add the user control to the placeholder with an explicit ID using LoadControl in the Page_Init event, but as said, the problem is that i only want 1 user control to load... and be responsive to the formview saves.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

I don't really see a question in there...what kind of help are you looking for?
which tab panel PlaceHolder ru using

r u using ajax tabcontainer or some other?
Avatar of Kiterq
Kiterq

ASKER

TheLearnedOne - how do i get one user control to load and be responsive to formview saves?

amar31282 - I am using System.Web.UI.WebControls.PlaceHolder and the AjaxToolKit TabContainer.

More information - there is a requirement to have each page of the associated formview usercontrol on a different tab.  


rkworlds - this looks good but will take a look at this once i get to work.




Is the FormView outside of the TabContainer, or on one of the tab panels?
Avatar of Kiterq

ASKER

The formview (inside a user control) is inside EACH of the tab panels.  I just want one usercontrol on the served page at any one time.
If the FormView is inside the user control, then what does "and be responsive to the formview saves" mean?  It should be pretty simple to have the FormView update, since it isn't outside the user control.  There might be something missing in the question, that would make this more complicated.
Avatar of Kiterq

ASKER

When i click save on the formview, it disappears.  It wouldn't be a problem if there was one usercontrol for each tabpanel (ie explicitly defined) however i just want one usercontrol dynamically added to the activetabpanel when it is clicked.

ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kiterq

ASKER

I put not complete as it did not explain exactly why, however it appears that the page life cycle was the issue.