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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:29:23+00:00 2026-05-25T17:29:23+00:00

I have a user control that has a gridview in it with paging. The

  • 0

I have a user control that has a gridview in it with paging. The paging is driven by an object datasource, so it’s using the dopostback events by default.

I want to use jquery to load the usercontrol into a tab via ajax because I have multiple tabs that I don’t want to load all at once and take all the database hits if they aren’t needed.

So I put that user control on a blank aspx file and set the tab’s href = to that aspx file. The gridview loads fine and looks great.

The problem I am running into is when I try to change pages on the gridview, the postback is going to the URL of the aspx file and not the page I am on with the tabs. I know this is supposed to happen, but I am wondering what I can do to make it so it can post back to the right page and work within the tabs.

It doesn’t work with and without an updatepanel around it.

Any help is appreciated.

  • 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-25T17:29:24+00:00Added an answer on May 25, 2026 at 5:29 pm

    client:

        <script language="javascript" type="text/javascript">
        $(document).ready(function () {
    
            var hdn = document.getElementById('<%= tabid.ClientID %>');
    
            var tbs = $("#tabs").tabs({
                select: function (event, ui) {                    
                    if (hdn) hdn.value = ui.index;
                }
            });
    
            tbs.tabs('select', <%= sel %>);
    
        });
    </script>
    
    <asp:HiddenField ID="tabid" runat="server" />
    

    server:

    method Tabs.Page_Load(sender: Object; e: EventArgs);
    begin
        if (page.isPostBack) then
            sel := tabid.Value
        else 
            sel := "0";
    end;
    

    where sel is a public property of the page class:

    Tabs = public partial class(System.Web.UI.Page)
        public property sel : String := '0';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have a User Control that takes a collection of People (property
I have a user control that has button whose click event handler contains the
I have created a user control UserVote that has property to find total vote
I have a user control that is pretty basic. It contains several TextBox controls,
I have a user control that I'm building. It's purpose is to display the
i have a user control that descends from UserControl. When dropped onto the form
I currently have a user control that is used on both an /Address/Edit and
I have a usercontrol that has several public properties. These properties automatically show up
I have created a UserControl that has a ListView in it. The ListView is
I have a Page that has a single instance of a UserControl that itself

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.