I set a property in my custom controller wrapper in OnActionExecuting, how to pass to Site.Master?
Posted
by Blankman
on Stack Overflow
See other posts from Stack Overflow
or by Blankman
Published on 2010-06-03T19:20:16Z
Indexed on
2010/06/03
19:24 UTC
Read the original article
Hit count: 184
ASP.NET
|asp.net-mvc
Say I have a class that wraps the Controller class:
public class MyController : Controller
{
public string SomeProperty {get;set;}
public override void OnActionExecuting(...)
{
SomeProperty = "hello";
}
}
Now in my site.master, I want to have access to the SomeProperty that I just set.
How can I do this?
© Stack Overflow or respective owner