A better way of working with IE Webcontrol - TabStrip Control

IE Webcontrols are very useful in accomplishing rich user experience for your web applications with the controls like TreeView, TabStrip, MultiPage etc., which are not shipped out of the box with ASP.NET 1.x Versions.

One of the commonly used IE Webcontrol is the TabStrip control. TabStrip control is mostly used in combination with MultiPage control.

TabStrip provides you with Tab Control for your ASP.NET Page through which you can implemented a Tabbed User Interface of Menu, Options etc.,

When we combine MultiPage with TabStrip control, we can show different portions of the Page based on the Tab selected.

This would give a wizard sort of look and feel for your pages where users see different parts of the page on clicking different tabs.

One common practice while implementing TabStrip control is to set the AutoPostBack property to True. This way we will be forcing a page refresh when a different Tab is selected. On this event, we populate, initialize the MultiPage associated with the Tab that is selected.

The fact to be noted is that, though while development, the Server lies in your local machine and the PostBack is not noticably slow, in real world scenarios, the postback may take quite some time before showing the other MultiPage.

This causes not only an irritating flashing of the page but the selected tab takes sometime to complete the events associated with it and gives an ugly look and feel until it is fully loaded.

A better way to handle this is to load, initialize all the multipages in the Page_Load or any other single event (DropDown selection etc.,) and then make it available for switching between tabs. You need to set the AutoPostBack property to false to avoid the PostBack.

If we load and intialize all the MultiPages in one single event, though it takes a little time initially to complete, later it provides a rich look and feel by avoiding a PostBack and ugly flashing of page everytime the Tab selected is changed.

Also, by this way you can also preserve the Controls' state across Tab switches. When you disable autopostback, you can notice that though you switch between the tabs, the controls in each tab dont lose their state. On the contrary if you have autopostback to true, you will be populating / initializing them on each postback and hence they may lose their state.

Thus, we can have a better way of displaying contents with IE Tabstrip webcontrol.

This article holds good only for ASP.NET 1.x versions since with ASP.NET 2.0 (scheduled to release this year), there are better controls than IE Webcontrols.

Cheers and Happy Programming !!!

posted @ Saturday, October 15, 2005 8:10 AM

Print

Comments on this entry:

# re: A better way of working with IE Webcontrol - TabStrip Control

Left by Richard at 12/16/2005 7:51 PM
Gravatar
how can i select each page if postback is false

# re: A better way of working with IE Webcontrol - TabStrip Control

Left by Harish Ranganathan at 12/19/2005 3:15 AM
Gravatar
Hi,

When AutoPostBack is false, it will still pick up the MultiPage specified for that Tab. The functionality doesnt change based on Postback.

# re: A better way of working with IE Webcontrol - TabStrip Control

Left by jeff at 1/3/2006 4:51 PM
Gravatar
What is a better Tab control in asp 2.0?

# re: A better way of working with IE Webcontrol - TabStrip Control

Left by mark at 2/13/2006 5:59 PM
Gravatar
wich controls are better than ie webcontrols?

# re: A better way of working with IE Webcontrol - TabStrip Control

Left by Swapneel Talera at 2/20/2006 8:26 AM
Gravatar
what if you have a single page with a grid, and all the time you refresh it and bind it with some other data, then how do you avoid the flashing.

# re: A better way of working with IE Webcontrol - TabStrip Control

Left by Jyothi at 2/7/2007 11:30 AM
Gravatar
I have the tabstrip control which is working in localhost but not working when i moved to other environment which has .net 1.1 framework installed with having the reference of Microsoft.Web.UI.WebControls in bin. What may the reason

# re: A better way of working with IE Webcontrol - TabStrip Control

Left by mario oyunları at 9/21/2009 10:40 AM
Gravatar
all the time you refresh it and bind it with some other data, then how do you avoid the flashing.

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345