How can I set attribute to MVC2 user control defined in single file with content:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
I’m searching declarative solution. Something like this:
<%[DefaultProperty("Items")]%>
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
Thanks.
You would need to create a new class that inherits from ViewUserControl
And then in your partial view you would use the Inherits attribute like this: