How to access controller methods from a view in ASP.NET MVC (jeffreypalermo.com)
submitted by
rcash(4149) 9 months, 17 days ago
Suppose my controller has important state or an important function, and I’d like to leverage it from the view. It’s not appropriate to factor out to an html helper or other view-based utility class. It is something unique to the controller. It would be very easy to just pass the controller over to the view so that the view could make use of its methods, but there is a lot of discussion why that is “dirty.”
|category: ASP.NET
|Views: 58
tags:
ASP.NET another
Everyones tags:
Your Tags: