.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

jquery tabs with ascx content

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net

First time I have started looking at jquery, and i'm not sure if the following is possible.

I have an aspx page containing the tabs, rather than putting all the content into the aspx page I decided to add a placeholder to each tab and load an ascx page.

This works, but now I want to add the ability to move to the next tab on a button click.

The button resides in the ascx page.

But is it possible to do this from the ascx page, as the tabs are on the aspx page?

View Complete Post

More Related Resource Links

Writing jquery for tabs to avoid hardcoding

I have created the tab  user control and loading it into webpart i tried to download jquery from the standard site for jquery but i dont want  to change CSS given by designer  so i have applied Class="Active" and display="block" in javascript function as foolows but this is not good approach  if(id=="hrefid1")//             { document.getElementById(id).setAttribute("class", "active"); document.getElementById("dvDtl1").style.display="block"; //tabs document.getElementById("href2").removeAttribute("class"); document.getElementById("href3").removeAttribute("class"); //tabcontents document.getElementById("dvDtl2").style.display="none"; document.getElementById("dvDtl3").style.display="none";   following is the usual html structure for tabs <div > <ul> <li> <href> tab1 <li href>tab 2 <li href> tab 3> </ul> //contents using divs <div1 </div>   how can i write jquery without having the requirement to hardcode the ids in javascript? if anyone has implented tabs . pls go on .   In short , i need to get the selected tab and  change the css  of selected and -non selected tabs dynamicaly

Jquery.tools tabs doesn't retain tab index on postback

The graphic designer of a project I'm building a web site for chose jquery.tools (http://flowplayer.org/tools/tabs/index.html) for a tabs tool in the site. Unfortunately it seems that the tool doesn't behave properly on a postback in IE7 or IE8 (it does behave properly in FireFox, Chrome and Safari). Does anyone have experience using the jquery.tools with asp.net? and know how to retain the tab index on a postback? I've tried a lot of things and can't get it to work. The code i'm using now is as follows:           $("ul.tabsScenario").tabs("div.panes > div");         var tabIndex = $('#ctl00_ContentPlaceHolder1_EnInDeToekomst1_HiddenFieldTabIndex').val();         $("ul.tabsScenario").tabs('select', tabIndex); where the tab index is stored in a hidden field (HiddenFieldTabIndex). The above code works fine in Firefox, Chrome and Safari, but not in IE7 or IE8. I am using a ScriptManager and UpdatePanels, but in an extremely simple website example I can't even get the jquery.tools tabs tool to work. There are some unanswered posts on the Jquery.Tools forum concerning this topic, but yeah, that doesn't help much. I've already determined that the

Problem running jquery script in Content Page

Hi!! I have a master page in asp.net and a content page with some basic asp.net controls like textbox,buttons,treeview....i have a jquery script in the content page and reference set to the jquery file..The script changes the text property of a button on the keydown event set for the textbox...the script works fine if i copy and paste it in a normal page...the script only ran once when i worte it for the first time the next day when i tried to run the script it was not working..i m facing this problem for running the script in content page and i a m not aware of how to write jquery script for the content page.. i m really not finding any solution where i am wrong i have even tried setting the internet explorer security setting to low..plz plz plz plz plz plz help me on Thanks!!

Accessing ASPX page elements from ASCX'S jquery function


Hi Friends, I need your help.

I have aspx page and in that page i registerd ascx page. i want to access the aspx page <div id = "idofdiv"> from ascx page jquery function. i have jquery function in ascx page. i want to access idofdiv in that function. how could i achive this?



jquery not working in content pages and debugging jquery


Hey! Friends

        Please provide me some sample code to work with jquery in content pages. For example my jquery code for validating username availability works in web form but not in content page.

Thank You.

using jquery in content pages


i have found out a way to find controls on content pages by using

var txt = $('input[id$=TextBox1]'). But how to access html elements like "<p>" tag and others in jquery when the html elements are in content page only.


jquery with content pages.... ARRRGGHHH!!!


Sorry, for the subject, but this is getting very annoying... 

basically, from what i have endured from the past day and half, jquery does not work with content pages.

i currently have the main jquery script in the master page ( in header ):


script language="javascr

jQuery tabs, how?


 Hi there,

I am new to jQuery and is trying to get a tab-like experience on my site using divs and jquery. I want to have it look like the visual studio product feature page (http://www.microsoft.com/visualstudio/en-za/products/2010-editions/premium)

How do I go about to achieve this?


where can i find Jquery tabs webparts for Sharepoint 2010?


Hi All, I'm after a Jquery tabs webparts for Sharepoint 2010? i came across this one http://jquerytabswebpart.codeplex.com/ But its only for SP 2007. Any resources would be appreciated. THanks

jquery validation in ascx page


Following on from my post about using ascx pages for the content of the jquery tab panels.


Can I use jquery validation on each ascx page before submitting to move to the next tab panel?

I've been trying the following way, but when I click the submit button I get the error 'Object doesn't support this property or method'.


<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
    <div id="tabs">
            <li><a href="#tab1">Your Details</a></li>
            <li><a href="#tab2">Course Details</a></li>
            <li><a href="#tab3">Education & Employment</a></li>
            <li><a href="#tab4">References</a></li>
            <li><a href="#tab5">Submit Application</a></li>
        <div id="tab1">
            <asp:PlaceHolder ID="plhApp" runat="server"></asp:PlaceHolder>

problems with using jQuery for reordering groups on an ascx page


Hi all. im making a page that has its header, its footer, and its side menus all in seperate controls (ascx pages).  The reason is so i don't have to rewrite that code for every single page when only the inner content will be different.

In my Menu control there is a list of items that gets populated when the page loads from a database.  The items have an order in the database and i want to be able to reorder them by dragging and dropping.  I am using jQuery and the actual physical drag and drop is working but i am having trouble getting the new order to save in the database... atleast when it is on the ascx page.

It works when the menu is on the aspx page.

In my events.aspx page i have

<div id="contentLeft">
<asp:Repeater ID="FormGroupList" runat="server">           
        <li id="<%#Eval("FormGroupID")%>" class="itemStyle">                   
            <a class="active" href="fields.aspx?fg=<%#Eval("SectionHeading")%>"><%#Eval("SectionHeading")%></a></li>           

Loading pages content with jquery


Hi people

I would like to know, based on your experience, if loading every page content into a div with jquery is a good practice.





Tabs creation using Jquery at runtime


Hi ,

      Can anyone tell me how can i make Tabs using Jquery at runtime ?

    Suppose , i have some input  (say 3 ) than depending on this input value  ,  3 tabs using JQuery  should be created  at runtime.

Please tell me if anyone knw .




How to UPdate the existing JQuery assigned to Content Editor WebPart?


Hello All,

I have a CEWP with Javascript assigend to it..how to modify the script assigned to?


GridView Confirmation Box Using JQuery BlockUI in asp.net

JQuery is the most popular JavaScript library. One of the main reasons for its fame is the plugin architecture. Anyone can create a separate library that leverage the JQuery library. In this article we are going to look at the BlockUI library which is used to block the user screen while performing a task.

SharePoint Tutorial - Content Types

SharePoint content types provide users with a way to manage and organize content in a more meaningful way. It's a reusable of settings you want to apply to a particular type of document in a library or item in a list.

jQuery $(document).ready() and ASP.NET Ajax asynchronous postback

Many call it the ASP.NET jQuery postback problem, but using the technique below should make it no problem anymore. $(document).ready() isn't called after an asynchronous postback. What this means? You lose the functionality that should be executed within $(document).ready() after an UpdatePanel rendered its contents after an asynchronous postback.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend