Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calling Public Function in Parent Page From User Control

Featured Replies

Hi ,

 

I'm just about to throw my pc out the window.

 

I have an aspx page, in it I have user control.

Also in aspx page code behind I have a public function let's say called TestFunction .

How on earth I call that function from my UserControl code behind ?

 

I've done it before (long time ago) , but I just can't remind myself and I can't find any solution on google.

 

I tried :

 

Dim myPage as Page = CType(MyBase.Page,Page)

Dim myPage as Page = CType(Page.Parent,Page)

Dim myPage as Page = CType(Parent.Page,Page)

etc

 

No luck ...

 

Thanks for any help.

  • 3 weeks later...

I'm not sure that what you are wanting to do is possible as the UserControl gets included into your page class as a data member

Can you make the method that you need to access in the container class a static?

 

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.