PLEASE HELP !! How To Reference Buttons in multiple ASPX pages IF

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone please help me understand how to do the following:

I have an ASPX page that has a tabstrip and multipage. On the multipage,
each pageview has an IFRAME that has another ASPX page loaded in it. I have
a button, that when clicked, I would like the emmulate the user clicking the
first tab (tab index 0) on the tabstrip back on the main ASPX page.

I need to know how to call functions, reference data, etc. from one ASPX
page to another even if they are inside an IFRAME.

I am looking for VB code, not javascript or vbscript.

If anyone can help I would appreciate it very much.. I have been at this for
2 days now...
 
If you just want to perform the logic contained in another page, you can
just create an instance of that page's class and call the method.

But if you expect to actually change the rendering of the parent page,
by triggering server-side events on that page from a different page,
WITHOUT javascript, you are out of luck. You are going to have to use
javascript.
ASP.NET is purely a server-side technology.
 
I appreciate the reply... I believe the first option you mentioned will
work. You would not by any chance have an example of how to do this would
you? I am going to try and see if I can do this, however, I am new to .NET
and still learning the ins and outs..... Thanks again for your help...
 
There isn't any trick to it. Page classes are just like any other
class. You can create an instance of them, and call public methods.
You could also expose the functionality as a static method, in which
case you could avoid creating an instance of the Page.

Add a public method to the Parent page.

From an event method on the child page:

ParentPage parentPage = new ParentPage();
parentPage.DoSomething();

or, if you create a static method:

ParentPage.DoSomething()
 
Cool... Thank you VERY much for your help....

Joshua Flanagan said:
There isn't any trick to it. Page classes are just like any other
class. You can create an instance of them, and call public methods.
You could also expose the functionality as a static method, in which
case you could avoid creating an instance of the Page.

Add a public method to the Parent page.

From an event method on the child page:

ParentPage parentPage = new ParentPage();
parentPage.DoSomething();

or, if you create a static method:

ParentPage.DoSomething()
 
Back
Top