Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Fire content code from master page (http://www.velocityreviews.com/forums/t714331-fire-content-code-from-master-page.html)

DavidC 02-08-2010 04:28 PM

Fire content code from master page
 
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.
--
David

Alexey Smirnov 02-08-2010 07:38 PM

Re: Fire content code from master page
 
On Feb 8, 5:28*pm, DavidC <dlch...@lifetimeinc.com> wrote:
> 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.
> --
> David


Hi David,

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

http://www.codeproject.com/KB/aspnet..._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


All times are GMT. The time now is 07:23 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.