>>>I want to create a tabbed UI. The controls that will appear on each tab should all be on a User Control which can then be added to the page at runtime.
>>>
>>>It's amazing that a "superior" tool like VS requires you to jump through hoops to do so many simple things.
>>>
>>>
>>Is it for Web application or Windows? I just did something similar for Web (have all tabs as UserControls), though I added them in design-time.
>
>Naomi, since I was working on a similar idea I am curious about how you did this. Are you populating only the selected tab when the page postsback and leaving the other tab controls empty until they select them? I am assuming you have to post the page back on a select and no reason to have all the controls on every tab populated. Also then are you preserving any data within a tab when they select a different tab.
>Just questions I had when thinking about this idea for my project.
>Tim
Hi Tim,
In my case we had an existing page with "custom-made" (by my colleague) tabs. In one page we had multiple forms (FormView) for different kind of person. Each person has some common info (General Info, Address Info, User Info) and some tabs that are particular for the certain type. All was hardcoded in the page.
I was tasked with creating a similar page, so my first idea was to create a User Control for each "tab". So, I just put all controls into the UserControl and created a property for each binding field. I also added a call to a method to set EditMode (readonly for textboxes and enabled for checkboxes/comboboxes).
So, one page I created I put multiview on it and activate each view with the form with certain tabs (User controls).
That's what I did for now.
If it's not broken, fix it until it is.
My Blog