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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:29:46+00:00 2026-05-19T14:29:46+00:00

I have MainLayout.master that has UC_Menu.ascx on it. I have a page named Customer.aspx

  • 0

I have MainLayout.master that has UC_Menu.ascx on it.

I have a page named Customer.aspx that uses MainLayout.master. Customer.aspx also contains a UserControl named UC_Details.ascx.

How can I have UC_Menu.ascx call a function that is in UC_Details.ascx with this scenario?

I’ve seen a few similar examples, but none that match this type of layout.

  • 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-19T14:29:47+00:00Added an answer on May 19, 2026 at 2:29 pm

    In my opinion you should raise event from UC_Menu.ascx, then handle it in Master page and raise event again from Master page already. Finally you can intercept event with event handler in Customer.aspx and call function from UC_Details.ascx.

    So, the code for this issue should be:

    1) Inside your UC_Menu.ascx.vb raise an event:

    Partial Class UserControls_UC_Menu
        Inherits System.Web.UI.UserControl
    
        Public Event SomethingChanged As EventHandler
    
        Public Sub SomethingHappend()
            RaiseEvent SomethingChanged(Me, EventArgs.Empty)
        End Sub
    
    End Class
    

    2) In Master page catch event and raise it to Customer.aspx

    Public Event SomethingChanged As EventHandler
    
    Private Sub UC_MenuInstance_SomethingChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UC_Menu.SomethingChanged
         RaiseEvent Me.SomethingChanged(Me, EventArgs.Empty)
    End Sub
    

    3) Define in Customer.aspx markup after page directive:

    <%@ MasterType VirtualPath="~/MasterPages/MainLayout.master" %>
    

    4) Inside UC_Details.ascx.vb define some method that should be called:

    Public Sub DoWork()
       'Do some work here
    End Sub
    

    5) Place into Customer.aspx.vb:

    ' Add handler for Master page event
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
        AddHandler Me.Master.SomethingChanged, AddressOf MasterEventHandler
    End Sub
    
    ' Call UC_Details user control function here
    Private Sub MasterEventHandler(ByVal source As Object, ByVal e As EventArgs)
            UC_DetailsInstance.DoWork()
        End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Page that is associated with a master page. In the master
I have an app with a RelativeLayout that contains a ProgressBar and a WebView
I have some code that I am putting in the code-behind of a master
I have an app that main layout is a custom top bar (with actions
i have in xml tis code: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/mainLayout android:layout_width=wrap_content android:layout_height=wrap_content> <Button android:id=@+id/examp1 android:layout_width=wrap_content
I have rendering a section in the bottom master layout. This is typically section
I have xml file and that create view and i pass that screen shot
i have coded an android application that will update GPS coordinates to the exif
I do have the following code: def init_widgets(self): mainLayout = QtGui.QGridLayout() self.label1 = QtGui.QLabel(Enter
I have two fragments in an activity: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=horizontal android:id=@+id/mainlayout android:layout_width=fill_parent android:layout_height=fill_parent> <fragment

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.