Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi tab forms application 2

Status
Not open for further replies.

Terpsfan

Programmer
Dec 8, 2000
954
0
0
US
I am in the process of web enabling an application that currently is a windows forms application programmed in Access/VBA. My programming environment will likely be ASP.NET. My current application deals with reviewing loans in many different categories for Quality Control review. I have a multi-tab form(20 tabs) that basically is a one stop shop for everything dealing with the review.

What would be the best application methodology to use for ASP.NET? Would it be best to use server controls or html controls for my data entry controls? Would it be best to use a multi tab approach or only load the required subform? The reason I'm going towards the multi tab approach is that there is quite a bit of interrelatedness dealing with values in controls. But I'm wondering if I might be consuming too much server resources by having a form with a considerable amount of controls on it. I'm also concerned about using server controls because they may consume too many resources.

Then if I go with the multi tabbed approach, am I better off using the tab control that comes with the Web Controls or should I use frames or panels instead? Should I only load those controls that I will need for the tab that is clicked and make the controls on the other tabs invisible and disabled until needed?

I know I am throwing a lot of different stuff out right here but I'm looking for other perspectives for this project. Thanks in advance.
 
- Always use html controls where possible, but don't split hairs about it. If you need functionality from a server control, use a server control. If you just need a label that will always be static, use an HTML label.

- I wouldn't touch the tab control that comes with asp.net if my career depended on it. Its just not robust enough. Your options are either use panels (which is very viable and can be implemented easily), or a third party control like the Infragistic's tab control. I'd stay away from Frames...too many issues with them.

- Keep in mind that even if you have a form with 20 tabs, and a few hundred controls, only the controls that are coded to be visible will actually be rendered in the browser.

- If you're concerned about keeping all your code within one page, you could do something like splitting all the tabs into seperate pages, and created a user control that has 20 buttons, link buttons, whatever, which will navigate throughout the pages. That way you can just drop it on to each of the 20 pages and have navigation covered, so you can focus on the business logic of the individual pages.

Some ideas anyway,

hth

D'Arcy
 
Thanks, your response was very informative. I have been playing around with the panel controls but the problem I have with them is that I seem to have a problem moving a control around on the panel. Placing multiple panels on the form seems also to be a bit cloggy.

You mentioned splitting all the tabs into separate pages. Are you meaning separate tab pages or separate web forms? Are you saying I would have separate web forms for each tab but have the 20 link buttons on each? And just redirect to that page when that link is clicked?

Can you suggest a tutorial or book that treats using panels? The book I'm going through now doesn't deal with that topic. Thanks again.
 
If you're using 20 tabs on a master tab control (like the IE WebControls available from then this might be a lot of data. However,you *could" load each sub-section via a user (or custom) control and then have more decentralized managerial control over each tab.

However, employing this method by loading multiple controls is slower than loading all the data into the page.

For instance, check out the tabbed control on a site I did recently (about halfway down the page on the right):
The content in each tab is generated through seperate user controls, each of whichs reads from a master XML data document and filters the data for that content area. It loads pretty quick. Just a thought. :)
 
Jason, I liked your idea. I found a working example using panels but it again seems rather difficult for manipulating controls on the form. Layering 20 panels on top of each other doesn't seem like a viable solution either. I don't feel like peeling an onion so to speak every time I have to add a control to a panel.

Do you have a code example of how you get the tab controls populated dynamically via an xml doc? And how do you suppose this would work for retrieving data from and adding data to a database?

As far as panels go, how about the html version of the panel, would that be a viable solution?
 
You *could* use the IE WebControls TabStrip server control and programmatically add content for each major node.

You'd need to use an instance of an XmlTextReader for quick, forward-only access, and then build each tab based on how many major node groups you had.

For instance, if this was your XML structure:

<?xml version=&quot;1.0&quot;?>
<mycontent>
<content>
<articles>
.... some content
</articles>
</content>
<content>
<graphics>
... some content
</graphics>
</content>
// more <content> nodes as needed
</mycontent>

You could create a new folder tab for each <content> node and then you'd have a tabstrip structure.

If you need to do work with a database (and independently on each tab), then as long as your TabStrip control was within the server-side <FORM> tags, or alternatively, if you used a seperate user control per tab, you could still do this.
 
Omega, you wouldn't need to layer the panels overtop of each other in the designer.

have all of your 20 panels spread out over your page, so that if you do need to add a control, you can get to the panels easily.

In your page_load in your code behind, simply go through each panel setting:

panel.style.add(&quot;Top&quot;, &quot;valuehere&quot;)
panel.style.add(&quot;Left&quot;, &quot;valuehere&quot;)

The top and left values will be where you want the panels to display on the page. When the page runs, it will render the panels to that location.

One solution for that option anyway.

D
 
Thanks both of you for your ideas. I am going to experiment with these approaches and see which one looks like the best option. This has been a great help to me.
 
I downloaded the file for the Microsoft Internet Explorer Web Controls. However, when I run the setup file I'm not getting the Microsoft.Web.UI.WebControls.dll file as part of the download. The site I am downloading from is:


Can anyone suggest a different download site or a different way of getting these controls?
 
The .DLL is in there somewhere...try doing a system0wide search on your machine. The installation instructions are kinda tricky for it. If you don't find it, e-mail me at jason@kuam.com and I'll send you mine.
 
I believe by default they install to your C:/program files/ directory. In your project, you just have to right click on your toolbox, add a control, and navigate to the bin folder within its directory.

If its still not there though, like Jas suggusted, do a search or just get them from him.

D
 
I had to modify the build.bat file to point to the csc.exe file on my computer. I reran the build.bat file and it installed the webcontrols.dll.
 
Omega, I thought having all of the panels on the same page in the designer was somewhat hard to deal with, so I placed several IFRAME objects on the form (all on top of each other) that act as my panels. The src of the IFRAME is actually a separate aspx page, so I can easily go to that page and maintain controls and code on that page. For my particular project, this proved easier than having everything in one page.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top