?
Solved

Adding Dynamic User Controls tab panel PlaceHolder

Posted on 2010-01-04
10
Medium Priority
?
1,312 Views
Last Modified: 2013-11-26
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.
0
Comment
Question by:Kiterq
10 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 26181057
I don't really see a question in there...what kind of help are you looking for?
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 26181127
0
 
LVL 14

Expert Comment

by:amar31282
ID: 26181142
which tab panel PlaceHolder ru using

r u using ajax tabcontainer or some other?
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

by:Kiterq
ID: 26183890
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.




0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 26184176
Is the FormView outside of the TabContainer, or on one of the tab panels?
0
 

Author Comment

by:Kiterq
ID: 26185359
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.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 26185853
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.
0
 

Author Comment

by:Kiterq
ID: 26185934
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.

0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 1000 total points
ID: 26186522
That sounds like a problem with the page life-cycle.  When you click Save, then the page posts back, and you are not re-loading the User control at the right time...
0
 

Author Closing Comment

by:Kiterq
ID: 31672702
I put not complete as it did not explain exactly why, however it appears that the page life cycle was the issue.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question