views:

49

answers:

1

I'm using Asp.net and have just started to look for a tab solution and I really like jquery ui. The most important thing is that the tab content only load when the tab is active. As I use Asp.net I have some GridViews connected to SqlDataSources in each tab and only want this content to load when the user selects the specific tab. Using the standard tab it seems like it's loading all data at once.

My solution right now is to use Ajax mode and then add the content of the tabs to different asp.net pages. That way the content only gets loaded when the tab is active. Do you think this is the way to go or is there a better way of doing it?

My tab contents looks something like this:

<asp:SqlDataSource ID="DSTest" 
    runat="server"
    DataSourceMode="DataSet"  
    ConnectionString="XXX"
    ProviderName="MySql.Data.MySqlClient"
    SelectCommand="SELECT * FROM table;" 
    >
</asp:SqlDataSource>
<asp:DataList ID="DataListTest" runat="server" DataSourceID="DSTest">
    <ItemTemplate>
        <%# Eval("id") %>
    </ItemTemplate>
</asp:DataList>
A: 

AJAX mode is totally the best way to defer execution until the tab of interest is selected.

David Hedlund