Fire content code from master page

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top