title: loading an ASPX page into a jQuery UI Tab with AJAX
body: <p>I have some experience with jquery and regular html pages but only just started learning .net. I have searched everywhere and I cannot find a good tutorial or example of how to load aspx pages into jquery ui tabs with ajax. I have a Main.aspx page which has some jquery ui tabs for navigation. I would like to load the content for each tab with ajax. I have tried to use the <a href="http://jqueryui.com/demos/tabs/#Ajax_mode" rel="nofollow" title="Ajax mode">Ajax mode</a> of jquery ui tabs but it seems like when the aspx page contains certain web controls it does not load for some reason. The aspx file that I want to load into the tab only has a button control that, when clicked, changes it's text to say "hello". </p>
  
  <p>Here is the tab section of Main.aspx:</p>
  
  <pre><code>&lt;div id="tabs"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="test.aspx"&gt;&lt;span&gt;Test&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#tabs-2"&gt;Second&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#tabs-3"&gt;Third&lt;/a&gt;&lt;/li&gt;
     &lt;/ul&gt;
     &lt;div id="tabs-2"&gt;Second Tab&lt;/div&gt;
     &lt;div id="tabs-3"&gt;Third Tab&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is the the test.aspx code:</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" 
      Inherits="TropicalServerGUI.test" %&gt;
  &lt;div&gt;
      &lt;asp:button ID="btn" runat="server" text="Button" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and its code-behind:</p>
  
  <pre><code>namespace TropicalServerGUI {
      public partial class test : System.Web.UI.Page {
          protected void Page_Load(object sender, EventArgs e) {
  
          }
  
          protected void btn_Click(object sender, EventArgs e) {
              //btn.Text = "hello";
          }
      }
  }
  </code></pre>
  
  <p>the second and third tabs which are static work fine but nothing gets loaded into the first tab. If I were to remove the button control and put, for example, <code>&lt;h1&gt;Hello World&lt;/h1&gt;</code> then it loads the page correctly. I know I am doing something completely wrong  and I cannot find any website that addresses this topic, so any help with this would be greatly appreciated!</p>