Ajax Tab数据绑定

How would I bind a data table to an Ajax tab at the click of a button, given that I don't have my query results at page load?

UPDATE

I found that it was very easy to bind data to a gridview within Ajax tabs. Of course you needed you script manager ajax reference declared in the asp page and web.config file. You also need to add the ajax css style to an existing style sheet. i tried using a seperate one and it didn't work.

ASP HTML

<AjaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
                            Visible="false" ScrollBars="Both"
                            CssClass="Tab2" Width="1326px" Height="464px" >

<AjaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="Empty" Enabled="true"    ScrollBars="Both" CssClass="Tab2">

<ContentTemplate>
<div style="overflow:auto;width:1287px; height: 418px;">
 <font color="white" size="1" face="Verdana">

 <asp:GridView ID="SalesOrderView1"     runat="server" BackColor="White"   BorderColor="#DEDFDE"visible="False"BorderStyle="None"      BorderWidth="1px" 
 CellPadding="4" ForeColor="Black" 
 GridLines="Vertical"     HorizontalAlign="Center">
 <AlternatingRowStyle      BackColor="White" />
 <FooterStyle BackColor="#CCCC99" />
 <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
 <PagerStyle BackColor="#F7F7DE"    ForeColor="Black" HorizontalAlign="Right" />
 <RowStyle BackColor="#F7F7DE" />
 <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
 <SortedAscendingCellStyle BackColor="#FBFBF2" />
 <SortedAscendingHeaderStyle BackColor="#848384" />
 <SortedDescendingCellStyle BackColor="#EAEAD3" />
  <SortedDescendingHeaderStyle BackColor="#575357" />
 </asp:GridView>
  </div>
  </font>
 </ContentTemplate>
   </AjaxToolkit:TabPanel>
      <AjaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="Empty" ScrollBars="Both" CssClass="Tab2">
 <ContentTemplate >
 </AjaxToolkit:TabContainer>

C# Code to bind data to the gridview on click button event.

                        SalesOrderView1.Visible = true;
                        TabPanel1.Visible = true;
                        TabPanel1.HeaderText = Order_List[multi_order_count];

You can use something like the following

$('.datatable').bind('click', function() {
  //logic
});