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 6869337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:32:44+00:00 2026-05-27T03:32:44+00:00

I have few jquery tabs on a usercontrol that loads a separate user control

  • 0

I have few jquery tabs on a usercontrol that loads a separate user control under each. Each user control is unique. It all works fine right now but the overall page response is too slow. In order to improve performance I am trying to load few user controls under these tabs on demand (that is on click of tab). Possibly without post back… ajaxish.
Can anyone guide me?
I tried to follow this tutorial and this one too but did not have any success. I have attached the code for parent usercontrol.

<ul id="tabs">
<li class="active">Rewards</li>
<li id="liCoupons">Coupons</li>
<li id="liLibrary">Library</li>
<li id="liProducts">Favorite</li>
<li id="liPreferences">Preferences</li></ul><ul id="tabPanes" class="rewardsTabs">
<li>
    <div class="wrapper active">
        <uc:Rewards ID="wellness" runat="server" />

    </div>
</li>
<li id="liCoupons">
    <div class="wrapper">
        <uc:Coupon runat="server" />
    </div>
</li><li id="liLibrary">
    <div class="wrapper">
        <uc:Library runat="server" />
    </div>
</li><li id="liProducts">
    <div class="wrapper">
        <uc:Products runat="server" />
    </div>
</li>
<li>
    <div class="wrapper">
        <div class="preferences">
            <uc:Preferences runat="server"/>
        </div>

    </div>
</li>

  • 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-27T03:32:44+00:00Added an answer on May 27, 2026 at 3:32 am

    The second link you mentioned should work. You don’t need to define any user controls in your markup.

    <ul id="tabs">
        <li class="active">Rewards</li>
        <li id="liCoupons">Coupons</li>
        <li id="liLibrary">Library</li>
        <li id="liProducts">Favorite</li>
        <li id="liPreferences">Preferences</li>
    </ul>
    <div id="results" class="wrapper"></div>
    

    Each tab click will do an ajax call

    $.ajax({
           type: "POST",
           url: "Default.aspx/WebMetodToCall", 
           data: data, // I wouldn't prefer passing webmethod name here
           contentType: "application/json; charset=utf-8",
           dataType: "json",
           success: function (msg) {
               $('#result').html(msg.d);
           },
           failure: function (msg) 
               //error
           }
       });
    

    to the web methods.

    [WebMethod]
       public static string Rewards()
       {
           return RenderControl("~/controls/rewardsControl.ascx");
       }
    
    [WebMethod]
       public static string Coupons()
       {
           return RenderControl("~/controls/couponsControl.ascx");
       }    
    ...
    

    Each method will render only the requested control. Also in your method you can keep or extract the viewstate depending on your needs. After rendering, the webmethod should pass back the html string to be injected into the placeholders.

    If you tried this and were successful rendering one control at a time but still seeing slowness then you have some back end issues while getting the data. If your controls are data heavy I would recommend doing some server side caching.

    Hope this helps.

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

Sidebar

Related Questions

I have a few jQuery click/hover events that attach to items in a list
I have a page with few tabs. I am looking for a way that
I have written a few jquery functions for form validation. It works fine but
I have few jquery tabs for my docs e.g. <div id=doc-tabs> <ul id=doc-list> <li><a
I have built two control containers on a page, one is using jquery-ui tabs
I have been working with the jQuery Grid the past few days and one
I have been going through the core jQuery code and had a few why
I'm progamming in javascript/jQuery. Say, I have an array with includes a few number
After working in good ole' c++ all day, I like to have a few
I have a few very simple jQuery functions running after the document is ready.

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.