How to use Tab Extender to use multiple tabs without postback

Hi

One of the very useful new extender in the Asp.Net Ajax is the tab control. This control is useful when you want to show the date in tab format without causing the postback when the user navigates from one tab to another.

A TabContainer is a host for a number of TabPanel controls. Each TabPanel defines its HeaderText or HeaderTemplate as well as a ContentTemplate that defines its content. The most recent tab should remain selected after a postback. The extender also maintains the Enabled state of the tabs after the postback

While using the Tab Extender we need to define the Tab Container and multiple Tab panel inside the tab container.

The ActiveTabIndex propertiy of the Tab Container is used to define the active tab, and the Height and width property are used to define height and with of the container of the container. Remember these do not include Tab panels header. We can sue the ScrollBars property defines if there will be Scrollbars in the tabs. The container also has 2 events ActiveTabChanged and OnClientActiveTabChanged.

The tab panel has the HeaderText, HeaderTemplate and ContentTemplate property to define the content of the individual tabs. We can use the Enabled property to define if tabs will be displayed by default. The on OnClientClick property takes the name of a javascript function that will be attached to client side click event of the tab.

Hope this helps
Thanks
Vikram


Share this post   Email it |  digg it! |  reddit! |  bookmark it!

Feedback

Posted on 3/1/2007 5:23:49 AM

Hi,
Is there a way to load the tab's content from a database on click of the tab? I mean say I have three tabs. When the user clicks the second tab, I would like to do some server side processing and then open the second tab. Similarly with other tabs.

Thanks

Posted on 4/18/2007 1:24:22 AM

The ActiveTabChanged event does not work.Actually this server side event is called after the post back.javscript is needed to cause the postback.

Posted on 4/23/2007 7:42:04 AM

Any idea how to set focus in one of the textboxes inside one of the panels inside the TabContainer?

Posted on 8/7/2007 12:17:08 PM

I had problem from adding tab control of ajax with atlas script manager

Posted on 11/22/2007 1:53:26 AM

When Tab panels changed, i want to display loading image before complete load.

Please post your comments:

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 
Copyright © 2006 - 2008 Vikram Lakhotia