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

  • Home
  • SEARCH
  • 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 8635695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:02:38+00:00 2026-06-12T10:02:38+00:00

I have 2 tabs. The first one is the most important and it loads

  • 0

I have 2 tabs.

  • The first one is the most important and it loads the content very fast.
  • The second one is not very important and it takes too long to load its content (charts and summaries)

So, I do not want to load both tabs’ content at the same time. Ideally, I would just load the first tab content and when the user clicks on the second tab I would load its related content (on demmand).

In order to do that, I need to know in server side that the second tab has been clicked and then send back all the relevant information to the client side.

Any ideas on how to do this?

  • 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-06-12T10:02:39+00:00Added an answer on June 12, 2026 at 10:02 am

    For this you will have to make changes on both client and server side.
    On server side (or code-behind), make the method Static and decorate it with [WebMethod] attribute.

    public partial class _Default : System.Web.UI.Page
    {
        ...
        [WebMethod]
        public static void MethodToBeCalledUsingAjax(parameters)
        {
            //tab clicked logic goes here
        }
        ...
    }
    

    On client side, inside tab click function, use jquery ajax as below

    var req = $.ajax({
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "Default.aspx/MethodToBeCalledUsingAjax",
                data: "{}",
                dataType: "json",
                success: function (msg) {
                }
            });
    

    This ajax call shall on demand inform server side that the tab is clicked and process the code accordingly.

    Please ignore the styling…i’m new to stackoverflow 🙂

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

Sidebar

Related Questions

Let's say that I have two accordion tabs. The first one loads hundreds of
I have a 2 tabs application. In the first one, I'm creating objects of
Hi I Have 3 tabs in one sceen.. first tab:some edittext fields with some
I have a table (jqGrid) inside one of the jquery ui tabs (the first
I have four tabs which the first one inserts data on the database, the
I have a main tabController that has two tabs, first one is selected as
I have a TabActivity with three tabs defined. The first tab is light-weight and
I have an app with several different tabs. The first of these tabs should
I have created tabs by using jQuery API and have bound one event handler
I have two tabs one called Sale-Items and the other All-Items and for each

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.