Tab Control - load user controls in tab dynamically when tab is selected

I have searched the forum and I cant seem to find the answer to my question, although I have tried some of the hints I have found with no luck....

Can someone show me a working sample (with source code) of a page with a TabContainer and several tabs, with each tab having a user control, but the controls are not added/initialized/shown until the appropriate tab is shown/clicked?

Something like this forum's "Write a New Post" page, where the tabs load after I click on them, and an animated picture displays to show that its loading.

The solution needs to add user controls to the page, not just html into a dynamic populate extender.

I have one user control per tab, and is linked (ala master-child relationship) to the page using a property. My user controls perform long-running web service queries, and I dont want to waste database/computing resources loading content into a tab that the user will never look at.   Right now, all tabs load their content when the page loads, even though the first tab is only shown.

As mentioned above, sample code for the page (.aspx and .cs) and the user control (.ascx and .cs) would really help.


5/16/2008 3:22:09 AM 17816 articles. 1 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 7

 Hi Blye,

I have the same situation as yourself and I was wondering if you ever found a solution.  


I'd greatly appreciate any help that anybody might have.





8/22/2008 10:51:09 AM

 I need to do the exact same thing... anyone find any solution? Thanks!

10/14/2008 4:26:40 PM


Frnds any one found the solution..

i have allso stuk on same prob..



11/5/2008 1:38:44 PM

Similar Artilces:

Tab Controls/tab pages/controls within tab pages
I give up! I have a tab control user object - inherited from u_tab - and some tab pages. Initially only one page is enabled which has a datawindow. When a valid data is entered in the DW, I need to enable rest of the tabs - Now - it is giving me a NULL object reference error during execution for the following statement in an event of the DW - tabcontrol.tabpage.enabled=TRUE getparent( ) also giving errors - HELP! How can I do this? Thanks! Ragni Ragni -- If you have CreateOnDemand set for the tab, then the tab pages are not valid until the user accesses them. ...

Tab Controls
Hello - I'm using PB 6.5. I can't get the selectedtab property to work in any event. I want a different tabselected to show based on what menu item is selected. I have put tab1.selectedtab=X in several events and none of them will cause ANY tab to be selected and have focus. Not until one of the tabs is clicked, does this work. There seems to be something going on in the opensheet command. Anyone have any ideas? THANKS ---== Posted via the PFCGuide Web Newsreader ==--- Have you tried SelectTab()? Let us know, Terry...

Name: Danny Email: danheidiatrogersdotcom Product: Thunderbird Summary: TABS, TABS, AND MORE TABS. Comments: Hi Why is it that EVERYTIME I get a new upgrade whether on Firefox or Thunderbird, I get TABS? I now have an upgrade on Thunderbird and guess what, I have an 'Inbox' TAB that i don't know how to get rid of. Any ideas? Another issue is. Why doesn't Firefox display something telling me it is working/looking for the site I want. I click on a site and stare at Firefox and don't know if it is doing anything. The previous versions were mu...

Tab control tabs
Hi, Is there a way to show the tabs of a tab control on the left (instead of the default “top”)?  (Something like the “Customer & Partner Solutions” on )  Thanks, Z That’s nice… But I meant is it possible to do it with the AJAX tab control?  ...

Deleting pages of tab control inside tab control
It's about Power Builder 5.0. I have one tab control and inside this other tab control with few pages. How can i delete these pages and how to get a popup menu for these tabpages ( right click shows only menu of older tab control ). I know how to perform it from older tab control and tab page but i am unable to do it when i am positioned on child tab pages. Answer me here or at ...

Dynamic Add User Control Object To The Tab Control
 Anyone can suggest what's wrong to the code below as the User Control objects ONLY appear in the first tab and NOT in the balance tabs ? 1) User Control name - usRFQDetail 2) Tab Control name - tcRFQDetail Dim tcPage As New TabPage Dim ucRFQDetailInstance As usRFQDetail() = New usRFQDetail(100) {} Dim sdrReader As SqlDataReader = cmdReader.ExecuteReader(CommandBehavior.CloseConnection) With sdrReader If .HasRows Then ucRFQDetailInstance(intTotalTab) = New usRFQDetail .Read() tcRFQDetail.TabPages(intCurrentTab).Text = .GetStrin...

Adding Button only to selected tab in Tab Control?
I'm using the Tab Control and I'm creating Tabs dynamically. I've just figured out how to use Headertemplates on my dynamically created tabs. I have some headertext and an ImageButton (close button) in my HeaderTemplate. But I only want that ImageButton to be visible on the selected tab. In code behind I can easily make different HeaderTemplates depending on weather the tab is selected or not, but then I have to enable AutoPostBack on my TabContainer and that's not something I  wanna do. Is there a way to hide my ImageButton on all tabs except on the s...

Dynamically Add New tab to Tab Control
I have a hyperlink on one of tab's content.  When the user clicks the link, I want it to load the page that the hyperlink is set to into a new tab panel.Has anyone done this or seen this done somehere?  Otherwise I wouldn't know where to render pages for hyperlinks.  I don't want it to render in the same tab because then that tabbecomes pointless and becomes a whole new meaning if I were to refresh it with a totally different page which would not make any sense to me. When is Microsoft going to get rid of VB.NET!...

Tab control/selected tab page problem
First thing, we are using PB 6.0. When using tab controls, we cannot cause any tab page other than the one in index position 1 to be selected when opening a window. We have tried posting events that will perform the code after the window is visible, to no avail. I even tried using the movetab() function as a last resort. That worked, almost. It brings the tab page I want selected to the first position (the other tab pages are disabled, by the way). Then, when the user clicks a radio button, certain other tab pages are enabled. When they are enable, though, they get moved before t...

Tab strip control
i am using a tabstrip control to which the tabs are added dynamically depending upon the condition matched. but in the tabstrip1.SelectedIndexChange event, i am not able to acces the selected index properly. the selected index returned to me on any tab click is zero or the index of the first tab. what can be done to deal with this problem?   plz help. thanx in advance. Sachin....

tab user obj vs. tab control
I have built tab page objects, inserted them onto a tab object which I then placed onto a sheet. I have been having problems with GPF fires all over the place (chokes mostly with multiple dw's on the tab page). I am about ready to give up trying to figure out the problem and just use tab controls on the sheet itself. I seem to remember reading that it is more efficient to create user objects versus putting the controls directly onto the sheet. If this is the true, why? And is it worth it to continue beating my head against the wall trying to solve the gpf? Thanks On Mon,...

Dynamically creation of tab pages in tab control
Hi, iam using PB 8.0 . please let me know how to create tab pages dynamically in tab control and how to set the properties like Name, tab page text,.. to dynamically created tabpage. Thanks in advance On Jul 9, 8:18=A0pm, shk <> wrote: > Hi, > > iam using PB 8.0 . > please let me know how to create tab pages dynamically =A0in tab control > and how to set the properties like Name, =A0tab page text,.. to > dynamically created tabpage. > > Thanks in advance You need the opentab function which allows you to create any pre...

Dynamic User Control Inside Tab Control
I have a web aplication with one web form and one user control. The form contains a tabcontiner with NO tab panels. On each load, one tab panel is dynamically added to the web form and the user control is dynamically added to the tab panel. The user control contains a button. It raises an event on its click event.  Once you click on the button, the event is never called. This is strange because the code works perfectly if the user control is dynamically added inside a panel instead of a tab control. Any ideas?    private void makeTabs() { try ...

Set the control's tab order in a tab control
How can I set the control's tab sequence in a tab page? Charles Right click inside the tab page, and select Tab order from the right mouse menu. Get out of tab order using the menu or toolbar. Kent Piland Charles wrote: > How can I set the control's tab sequence in a tab page? > > Charles ...

Tab control withouth the tabs.
I have a tab control with about 7 tabs on it and it works great. I have all of the behavior working exactly as it should. My problem - marketing said they would like a wizard that would walk you through the information in a specific order instead of letting the people do it in any order they want. But they still want the tab control available to them. The tab control does everything the wizard would do except it allows them to pick the tab to go to. Any way to turn of the tabs in the tab control and force them to use buttons ( which I've programmed ) to move around? Jeffrey B...

Web resources about - Tab Control - load user controls in tab dynamically when tab is selected -

Placebase team at Apple file “Schematic Maps” patent dynamically detailing important data
In a report from Computerworld way back in 2009, we learned that Apple had quietly acquired Maps API company Placebase. Then, founder of Placebase ...

Apple's Lightning port dynamically assigns pins to allow for reversible use
... a closer look at how Apple's new Lightning connector works, and has come to the conclusion that the 8 pins on each side of the plug are dynamically ...

In a dynamically typed language, is it a bad idea to return different data types?
In some cases, returning different types from a single function works.

Urlbox Launches Screenshots-as-a-Service Platform to Dynamically Update Galleries
... changes. Launched yesterday, Urlbox allows anyone with a gallery displaying website screenshots to automate the process and keep them dynamically ... launcher dynamically adapts to what you’re doing right now
... phone according to what you’re doing. Perform a search for ‘football’ and your background will change to the NFL logo. A launcher that dynamically ...

A YouTube Experiment Resizes the Player Dynamically
There's a new YouTube experiment that changes the video player's size, depending on the browser window's size. When resizing Chrome's window, ...

Apple Granted “Dynamically Changing Cursor for User Interface” Patent, Originally Filed in 2003
... a utility patent that covers the use of the mouse cursor that changes according to the context of the task it is engaged in. Called a “Dynamically ...

Atmel's FPSLIC II Dynamically Reconfigurable SoC Supports "Silicon-Sharing" For Peripherals & Interfaces ...
Silicon-Sharing Fits 200K Gate Design into 40K Gate FPSLIC II's, Cuts Power Drain by 97% Launcher Wants to Dynamically Change Phones Based on Location, Interests, and Mental State ...
What if your phone’s launcher dynamically changed based upon interests, your location, or topics you had in mind at a specific moment? A new ...

Resources last updated: 12/15/2015 9:49:30 AM