views:

162

answers:

2

Which control is best in terms of performance... multi-view or TabContainer in asp.net ?

A: 

As far as i know TabContainer isn't a native control in ASP.NET, you could use TabStrip from microsoft.web.ui.webcontrols, but this is limited to Internet Explorer.

So if you have TabContainer from a third party source, use MultiView which is native to asp.net therefore faster. But everything in ASP.NET eventually renders as basic HTML.

I don't know how they render in HTML.

GxG
Just because its from Microsoft doesn't mean that its better or faster. There are many third party controls, framework, libraries etc that are "better" then the same Microsoft product.
Mattias Jakobsson
all other external controls are weak and about 90% of them are based on ASP.NET controls or on HTML.If they are based on ASP.NET they are slower because they have to be rendered first into ASP.NET controls and then into HTML. If they are based on HTML they will be rendered as HTML so it won't actually matter... If you use AJAX toolkit it will decrease the performance, being a third party control. All third party controls are slower because they need to be firstly rendered through the ASP engine. They look better they are an improvement in terms of usability but not in terms of performance.
GxG
Microsoft build their controls in the same way as any third party vendor does. So there is no difference there. All controls simply use the response to write the content that they want. Just because you base your control on a existing control doesn't mean it has to go through more stuff. It just meant that you reuse some of the code that microsoft already wrote. There is no middle layer (that you call asp.net). Asp.net is a framework, not a language. All controls are compiled in the same way. So, no. Third party controls isn't slower.
Mattias Jakobsson
oh... okay... thanks for the info!
GxG
+1  A: 

According to your description I would probably don't use any of those two controls. I wouldn't go with tabs as you don't really need to be able to switch between them all the time as is seems. The tabs container uses javascript to enable you to change tab on the client side.

About the multiview. I find it bad practice to have that much different logic in the same place and it will probably give you problems later on. In my opinion and experience it's usually better to split that up in different pages and have one for each thing you want to add/modify (you can have the delete at the modify page and/or in the listings). I would recommend to stay away from the multiview control for tasks like this, as I think that having one page to show multiple pages is usually a bad idea.

Mattias Jakobsson
With the second part i agree... It is best practice to have different pages in a master page. they are much more easy to modify and manage. Tab pages are good in win forms. But for web use master - slave pages.
GxG