# Call a WebPage Public Method fromA Container

**URL:** <https://forum.xojo.com/t/call-a-webpage-public-method-froma-container/44735>\
**Category:** Web\
**Created:** [August 9, 2018, 10:06am UTC](https://forum.xojo.com/t/call-a-webpage-public-method-froma-container/44735 "2018-08-09T10:06:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Batakis](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@Michael\_Batakis](https://forum.xojo.com/u/Michael_Batakis)\
**Post date:** [August 9, 2018, 10:06am UTC](https://forum.xojo.com/t/call-a-webpage-public-method-froma-container/44735/1 "2018-08-09T10:06:37Z")

</div>

Hi,  
could someone please clarify how to reference to page which has implicit instance off?

For example from mainwebpage I declare

```
  Dim instancePage as New MyWebPage
  InstancePage.Show
  InstancePage.APublicMethodOnMyWebPage

```

Then lets suppose that within APublicMethodOnMyWebPage I try to call a container  
self.myContainer.visible= True

Which is ok…

But, if there is a button to the container that tries to call a method APublicMethodOnMyWebPage in the instance of MyWebPage (InstancePage) how to call it ? The self.Page.APublicMethodOnMyWebPage fails…  
Trying  
Dim w as InstancePAge = InstancePage(self.page)  
w.APublicMethodOnMyWebPage  
also fails…  
AnyHelp

Until now, in my app all pages are loaded at once when the app starts.  
I try to make it lighter but this way, that is,to put implicit instance OO tomost webpages and then to created them when I need them.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Michael\_Batakis](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@Michael\_Batakis](https://forum.xojo.com/u/Michael_Batakis)\
**Post date:** [August 9, 2018, 4:19pm UTC](https://forum.xojo.com/t/call-a-webpage-public-method-froma-container/44735/2 "2018-08-09T16:19:40Z")

</div>

Thanks, I think I made it.

In the container I set again

dim anotheInstance as new myWebPage  
anotheInstance.MyMethodCalledFromAContainer

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:18pm UTC](https://forum.xojo.com/t/call-a-webpage-public-method-froma-container/44735/3 "2020-10-29T19:18:59Z")

</div>


