title: Call JQuery function from code behind (aside) ASP.Net and C#
body: <p>I need to disable JQuery tabs programmatically. The tabs are inside an update panel (Ajax) and the update panel is in an ASP.NET page. 
  Code:</p>
  
  <pre><code>&lt;link type="text/css" rel="stylesheet" href="http://ui.jquery.com/testing/themes/base/ui.all.css" /&gt;
  
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="http://ui.jquery.com/testing/ui/ui.core.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="http://ui.jquery.com/testing/ui/ui.tabs.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  
      $(document).ready(function(){
          $("#example").tabs();
      });
  
  
      function hidetabs(){
          $(document).ready(function(){
          $("#example").tabs();
          $('#example').data('disabled.tabs', [1, 2]);});
      }
  &lt;/script&gt;
  
  
  &lt;%@ Page Language="C#" MasterPageFile="~/any.Master" AutoEventWireup="true" Codebehind="anycode.aspx.cs"
      Inherits="anycode" %&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;
  
  &lt;asp:UpdatePanel ID="UpdatePanel_Deal_Import" runat="server"&gt;
  &lt;ContentTemplate&gt;
  &lt;div id="example"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="#fragment-1"&gt;&lt;span&gt;One&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#fragment-2"&gt;&lt;span&gt;Two&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#fragment-3"&gt;&lt;span&gt;Three&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;div id="fragment-1"&gt;
  &lt;p&gt;
  First tab is active by default:&lt;/p&gt;
  &lt;pre&gt;&lt;code&gt;$('#example').tabs();&lt;/code&gt;&lt;/pre&gt;
  
  &lt;asp:Button ID="btn_Save" OnClick="btn_Save_Click" runat="server" Text="Save" Visible="False" CommandName="Save"&gt;
  &lt;/div&gt;
  
  &lt;div id="fragment-2"&gt;
  Lorem ipsum dolor sit amet, consectetuer 
  ut laoreet dolore magna aliquam erat volutpat.
  &lt;/div&gt;
  &lt;div id="fragment-3"&gt;
  Lorem ipsum dolor sit amet, consectetuer 
  aliquam erat volutpat.
  &lt;/div&gt;
  &lt;/div&gt;
  
        &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  &lt;/asp:Content&gt;
  
  
  Code behind:
  
  protected void btn_Save_Click(object sender, EventArgs e)
  {
  //here I need to diable the panels.
  
  }
  </code></pre>
  
  <p>The function btn_Save_Click doesn’t post the page so it doesn’t call the Javascript/jquery hidetabs function. Thanks for any help!!!</p>