How would you rate this article?

Rating: 4 user(s) have rated this article Average rating: 5.0
Posted by: retro
Date: 10/02/2009
Category: Web Development
Views: this article has been read 1518 times

Recent Articles Get the RSS feed

(26/06/2010)

Nochex merchant accounts provide you with everything you need to accept payments on your web site. With no monthly fees and support for a number of ecommerce solutions, including nopCommerce, it has never been easier to start selling online!

(25/05/2010)

Check out our latest project for community interest company S.C.A.

(25/05/2010)

We are pleased to announce support for version 4.0 of the .NET Framework on all of our hosting plans.

(11/02/2010)

We have just completed development of a new web site for UK based Aerial Spares.

(11/02/2010)

Today sees the release of the official nopCommerce user guide. It explains every part of the application in detail and includes a getting started guide so you can get up and running quickly.

read more read more

We recently experienced a problem whereby the ACT TabContainer did not maintain the ActiveTabIndex across postbacks caused by a number of different asp data presentation controls (GridView/FormView/DetailsView).

The postbacks produced by these controls do not appear to save the client state of the tab container.

You may have something like:

<ajax:TabContainer runat="server" ID="tcMain" ActiveTabIndex="0" AutoPostBack="true">

There are two solutions that we came up with.

1) Wrap your ACT TabContainer control in an AJAX UpdatePanel. This then seems to save the client state of the control.

2) Add the following javascript to your page:


   <script type="text/javascript"> 
        function OnTabChanged(sender, args) 
            {
                sender.get_clientStateField().value = sender.saveClientState(); 
            } 
    </script>

and call this function on your TabContainer's OnClientActiveTabChanged event:

<ajax:TabContainer runat="server" ID="tcVehicleDetail" ActiveTabIndex="0" OnClientActiveTabChanged="OnTabChanged">

This effectively saves the client state manually when a tab is changed.
 

Send to Friend  Send to friend

Comments

Comment this article
Name:
E-mail:
Comment:
Add Cancel