Fire content code from master page

  • Thread starter Thread starter DavidC
  • Start date Start date
D

DavidC

Is it possible to have a Menu item that is in a master page fire code that
resides in the content page code-behind? For example, I have an aspx page
and a aspx.vb page and would like to run code in the aspx.vb page from the
master page when clicking on a MenuItem in a menu control. Thanks.
 
Is it possible to have a Menu item that is in a master page fire code that
resides in the content page code-behind?  For example, I have an aspx page
and a aspx.vb page and would like to run code in the aspx.vb page from the
master page when clicking on a MenuItem in a menu control.  Thanks.

Hi David,

yes, you can do it by using CallByName() function

http://www.codeproject.com/KB/aspnet/Master_and_Contents.aspx
http://msdn.microsoft.com/en-us/library/chsc1tx6.aspx

But don't make it too complex. Just put your code into the vb-module
and use it from both, masterpage and content page.

Hope this helps
 
Back
Top