Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 804771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:58:21+00:00 2026-05-14T23:58:21+00:00

I use jqueryui-tabs to display a tabbed UI. here is how my markup looks

  • 0

I use jqueryui-tabs to display a tabbed UI.
here is how my markup looks in a MasterPage:

<div id="channel-tabs" class="ui-tabs">
    <ul class="ui-tabs-nav">
        <li><%=Html.ActionLink("Blogs", "Index", "Blog", new { query = Model.Query, lang = Model.SelectedLanguage, fromTo = Model.FromTo, filters = Model.FilterId }, new{ title="Blog Results" }) %></li>
        <li><%=Html.ActionLink("Forums", "Index", "Forums", new { query = Model.Query, lang = Model.SelectedLanguage, fromTo = Model.FromTo, filters = Model.FilterId }, null) %></li>
        <li><%=Html.ActionLink("Twitter", "Index", "Twitter", new { query = Model.Query, lang = Model.SelectedLanguage, fromTo = Model.FromTo, filters = Model.FilterId }, null) %></li>
    </ul>

   <div id="Blog_Results">
        <asp:ContentPlaceHolder ID="ResultPlaceHolder" runat="server">
        </asp:ContentPlaceHolder>
    </div>

If the content is loaded via ajax, I return a partial view with the content of the tab. If the content is loaded directly, I load a page that include the content in the ContentPlaceHolder.

somewhat like this :

<asp:Content ID="Content2" ContentPlaceHolderID="BlogPlaceHolder" runat="server">
    <%=Html.Partial("Partial",Model) %>
</asp:Content>

//same goes for the other tabs.

With this in place, if I access the url “/Forums” It loads the forum content in the Blog tab first, trigger the ajax load of the Blog tab and replace the content with the blog content.

I tried putting a different placeholder for each tab, but that didn’t fix everything either, since when loading “/Forums” it will sure load the forum tab, but the Blog tab will show up first.
Furthermore, when using separate placeholders, If I load the “/Blogs” url, It will first load the content statically in the Blog contentplaceholder and then trigger an ajax call to load it a second time and replace it. If I just link the tab to the hashtag, then when loading the forum tabs, I won’t get the blog content…

How would you achieve the expected behaviour?
I feel like I might have a deeper probelm in the organization of my views. Is putting the tabs in the masterpage the way to go?
Maybe I should just hijax the links manually and not rely on jquery-ui tabs to do the work for me.

I cannot load all tabs by default and display them using the hash tags, I need an ajax loading because it is a search process that can be long.

So to sum up :

  • /Forum should load the forum tab, and let the other tabs be loaded with an ajax call when clicking on it.
  • /Twitter should load the twitter tab and let the other tabs….
  • the same goes for /Blogs and any tabs I would add later.

Any idea to have this working properly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:58:23+00:00Added an answer on May 14, 2026 at 11:58 pm

    Here is how I solved my double loading problem when using the tabs in the masterpage and loading a content place holder in each of them so that I would could get to each tab with a different url :

     $(function () {
            var first = true;
            var $tabs = $("#channel-tabs").tabs(
                            {
                                ajaxOptions: {
                                    beforeSend: function (xhttp) {
                                        if (first) return false;
                                    },
                                    error: function (xhr, status, index, anchor) {
                                        $(anchor.hash).html("Couldn't load this tab. " + xhr.responseText);
                                    }
                             },
                             select: function (event, ui) {
                                    first = false;
                             },
                             cache: true,
                            });
        });
    

    When the page load, I cancel the Ajax request if it’s the first time it happens, I reenable it at the first selection of a tab.

    It’s not as clean as I would like to, but It does the job well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can use jquery ui tabs and bend the css used for the tabs.
I'm attempting to use the jQuery UI Tabs module, but whenever I attempt to
The markup required by jQuery UI Tabs is like following... <ul> <li>Tab1</li> <li>Tab2</li> <li>Tab3</li>
I'm playing around with jQuery tabs and have a prototype up and running. http://www.omnicom-innovations.com/play/tabsdemo.html
The website I am developing uses jQuery UI tabs to load content via AJAX
I'm (needless to say) relatively new to CSS3 and I'm having trouble with aligning
I am VERY new to jQuery. Just trying to get a feel. I like
I have been using asp.net programming just from few months and I have to
Let's say I have a page view called PagePreview.aspx . on that page I've
Having a strange issue with the TabContainer in the AJAX Toolkit. We have several

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.