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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:37:57+00:00 2026-05-17T21:37:57+00:00

I have three tabs. I want load then on demand except first tab. If

  • 0

I have three tabs. I want load then on demand except first tab. If i click the 2nd tab it will load the second tab. My problem is If i load 2nd tab and go to 3rd tab and when i come back to the 2nd tab it is loading again. That should not happen. once the tab is loaded it should not load again. How to achieve this? here is my sample code….

<cc1:TabContainer ID="tabEditTskContainer" OnActiveTabChanged="tabEditTskContainer_TabChanged"
OnClientActiveTabChanged="tabChanged" AutoPostBack="true" runat="server" Height="300px"
Width="100%" ActiveTabIndex="0">
<cc1:TabPanel runat="server" ID="tabEditTskPnl" Enabled="true" HeaderText="Current Balance History"
    Width="99%">
    <HeaderTemplate>
        Edit Task
    </HeaderTemplate>
    <ContentTemplate>
        <br />
    </ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="tabAttach" runat="server" Height="100%" Enabled="true" Width="99%">
    <HeaderTemplate>
        Attachments
    </HeaderTemplate>
    <ContentTemplate>
    </ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="tabAddNotes" Height="100%" runat="server" Enabled="true" Width="99%">
    <HeaderTemplate>
        Notes
    </HeaderTemplate>
    <ContentTemplate>
    </ContentTemplate>
</cc1:TabPanel>

<input type="hidden" runat="server" id="hdnTabAttach" />
        <input type="hidden" runat="server" id="hdntabAddNotes" />


function tabChanged(sender, args) {
        var tabIndex = sender.get_activeTabIndex();
        if (tabIndex == "1") {
            if (document.getElementById('hdnTabAttach').value == "0") {
                return true;
            }
            else
                return false;
        }
    }


protected void tabEditTskContainer_TabChanged(object sender, EventArgs e)
{
    try
    {
        int intTabIndex = tabEditTskContainer.ActiveTabIndex;

        if (intTabIndex == 1 && hdnTabAttach.Value != "1")
        {
            hdnTabAttach.Value = "1";
        }

        if (intTabIndex == 2)
        {

            DBLayer obj = new DBLayer();
            SqlCommand cmd = new SqlCommand();
            SqlParameter param = new SqlParameter("@fOrderID", SqlDbType.NVarChar, 255);
            param.Value = Session["selorderID"].ToString();
            param.Direction = ParameterDirection.Input;
            cmd.Parameters.Add(param);
            param = new SqlParameter("@fncatid", SqlDbType.NVarChar, 25);
            param.Value = "1";
            param.Direction = ParameterDirection.Input;
            cmd.Parameters.Add(param);
            DataSet dsGetNotes = obj.ExecuteDatasetSql("[usp_GetNotes]", cmd);
            Session["GvNotes"] = dsGetNotes;
            gvNotes.DataSource = dsGetNotes;
            gvNotes.DataBind();

        }

    }
    catch (Exception ex)
    {

    }

}
  • 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-17T21:37:58+00:00Added an answer on May 17, 2026 at 9:37 pm

    Quick and easy — add a hidden form field to your aspx page and append on the tab name to its value. Then, before you actually load a tab, make sure that value isn’t included in the hidden form fields value.

    I believe this should work, but the problem is that you are using the built-in ajax stuff from .Net, which I find difficult to work around. Normally, client-side, I’d make a global variable that tells me what tabs have been loaded, and only load a tab if it hadn’t been done before, otherwise, I’d just show the already loaded tab.

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

Sidebar

Related Questions

I have three tables: page, attachment, page-attachment I have data like this: page ID
I have three tables tag , page , pagetag With the data below page
I have three models: class ReleaseItem < ActiveRecord::Base has_many :pack_release_items has_one :pack, :through =>
I have three unordered lists that have been created as Scriptaculous Sortables so that
I have three (C++) classes: Player, Hand, and Card. Player has a member, hand,
I have three divs : <div id=login /> <div id=content /> <div id=menu />
I have three TextBox controls on the page <asp:TextBox ID=TextBox1 runat=server AutoPostBack=True OnTextChanged=TextBox_TextChanged TabIndex=1>
I have three tables in the many-to-many format. I.e, table A, B, and AB
I have three values I need to align in a dropdown box. How can
I have three easy questions. Does anybody use QuickTest Pro for automated testing? Any

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.