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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:59:26+00:00 2026-05-15T10:59:26+00:00

I’m wondering if someone can help me with this. I have three TabPanels depending

  • 0

I’m wondering if someone can help me with this. I have three TabPanels depending on which tab is clicked I would like to call a different c# function to display different content. I know I could just run all the functions when the page loads but this seems messy. I’m sure there is a way to do this but I’m not having much look. It’s possible I’m thinking about this from totally the wrong angle so please let me know if you can think of a better way to do this.

Any help would be greatly appreciated!

Example ASP.net

<ajaxToolkit:TabContainer ID="tabParameters" AutoPostBack="true" Width="100%" runat="server" ActiveTabIndex="0">
<ajaxToolkit:TabPanel ID="tabDetails" OnClientClick="Load_Details()" HeaderText="Details" runat="server">
  • 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-15T10:59:27+00:00Added an answer on May 15, 2026 at 10:59 am

    I would nest the “functions” into WebUserControls and put them into separate TabPanels. They do nothing on Page.Load and are Invisible. Define a function “BindData” that do all the DataBinding/Time consuming – stuff. When the user changes the ActiveTab (or for the default-active-tab) make that UserControl visible and call its BindData function.

    You need UpdatePanels(Updatemode=Conditional) around the UserControl and an Async-Postback-Trigger with Eventname=ActiveTabChanged so that only this Panel is reloaded.

    For example on ASPX(MD_Location is the UserControl, for lack of space i only posted one but you must imagine a lot of them):

    <act:TabContainer ID="TabContainer1" runat="server" AutoPostBack="true" >
        <act:TabPanel ID="TabLocation" runat="server"  HeaderText="Locations">
            <ContentTemplate>
                 <asp:UpdatePanel ID="UpdLocation" runat="server" UpdateMode="Conditional">
                     <ContentTemplate>
                        <MD:MD_Location id="MD_Location" runat="server" Visible="false" />
                     </ContentTemplate>
                     <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="TabContainer1" EventName="ActiveTabChanged" />
                     </Triggers>
                 </asp:UpdatePanel>
            </ContentTemplate>
           </act:TabPanel>
    

    and in the Codebehind (sorry, only VB.Net available, i hope you get the idea):

    Private Sub TabContainer1_ActiveTabChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabContainer1.ActiveTabChanged
            If Me.TabContainer1.ActiveTab Is Me.TabLocation Then
                Me.MasterDataType = "Locations"
            End If
            switchControlVisibility()
        End Sub
    
        Private Sub switchControlVisibility()
            Select Case Me.MasterDataType.ToLower
                Case "locations"
                    Me.MD_Location.Visible = True
                    Me.Lblheader2.Text = "Locations"
                    UpdHeader.Update()
                    Me.MD_Location.BindData() '<---- do  time-consuming  stuff
                    Me.UpdLocation.Update()   
    
        End Sub
    

    Example

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

Sidebar

Related Questions

I have some data like this: 1 2 3 4 5 9 2 6
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string

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.