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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:15:55+00:00 2026-05-21T05:15:55+00:00

1-I have three user controls. 2-I added them to AJAX TabContainer on my default.aspx

  • 0

1-I have three user controls.
2-I added them to AJAX TabContainer on my default.aspx page

<asp:TabContainer ID="TabContainer1" runat="server">
            <asp:TabPanel runat="server" ID="GroupOne">
                <HeaderTemplate>
                    1
                </HeaderTemplate>
                <ContentTemplate>
                    <SUR:GroupOne ID="group1" runat="server" />                  
                </ContentTemplate>                     
            </asp:TabPanel>
            <asp:TabPanel ID="GroupTwo" runat="server">
                <HeaderTemplate>
                    2
                </HeaderTemplate>
                <ContentTemplate>
                    <SUR:GroupTwo is="group2" runat="server" />
                </ContentTemplate>
            </asp:TabPanel>
           <asp:TabPanel ID="GroupThree" runat="server">
                <HeaderTemplate>
                    3
                </HeaderTemplate>
                <ContentTemplate>
                    <SUR:GroupThree ID="grup3" runat="server" />
                </ContentTemplate>
            </asp:TabPanel>
        </asp:TabContainer>

3- in the first user control i have image-button

<asp:ImageButton ID="ImageButton1" runat="server"  />

4- I have this code in my default.vb

Public Sub movit()
    GroupThree.Enabled = True
    TabContainer1.ActiveTab = GroupThree
End Sub

so how can i execute that sub when i click on the image button in the user-control??

  • 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-21T05:15:56+00:00Added an answer on May 21, 2026 at 5:15 am

    I believe you need to use a delegate to achive this. You can try followings

    In your ascx.cs or vb file Add a delegate inside the namespace but outside the UserControl class.

       public delegate void ImageButtonClickEventHandler(Object sender, EventArgs args);
    

    Inside UserControl class add an event using delegate.After that call the delegate inside ImageButtonClick event.

      public event ImageButtonClickEventHandler ImageButtonClickEvent;
    
    private void imageButton_Click(object sender, System.EventArgs e)
        {
            if(ImageButtonClickEvent!= null)
            {
                ImageButtonClickEvent(sender,e);
            }
        }
    

    In your aspx page add this inside page load event.

    UserControl1.ImageButtonClickEvent+=new ImageButtonClickEventHandler(UserControl1_ImageButtonClickEvent);
    

    Finally declare UserControl1_ImageButtonClickEvent function

    private void UserControl1_ImageButtonClickEvent(Object sender, EventArgs args)
        {       
            //Call your methods
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web page that uses three controls to allow a user to
I have a page with user controls getting dynamically added. Inside some of these
I have an aspx page that dynamically loads user controls: there is an UpdatePanel
Is there a way to access page controls from user control . I have
Have three classes User, Group and Field. Many to many relationship on User /
I have three tables: User: UserId (pk) FirstName Lastname Messages: MessageId (pk) Heading Body
I currently have three classes User , UserProfile , and Vendor . User is
I am using C# and Winforms 3.5 I have a list of user controls
I'm trying to pass user controls as pages. I have it working with buttons.
I have an ASP.NET web form which I am adding a variable number User

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.