ASP.NET MVC Referencing Html Helper from a view
Posted
by
Dan
on Stack Overflow
See other posts from Stack Overflow
or by Dan
Published on 2011-03-09T09:59:25Z
Indexed on
2011/03/09
16:10 UTC
Read the original article
Hit count: 214
asp.net-mvc-2
I've written an Html Helper called DetailsForm to reduce repetition when displaying fields in a view. Within a view - actually a partial view, ascx file - I can refer to it like this:
Storyboard.Helpers.DetailsForm.LabelAndData(Html, m => m.id)
But would like to refer to it like this:
LabelAndData(Html, m => m.id)
A 'using' directive doesn't seem to be allowed in the ascx file. Is there an equivalent?
© Stack Overflow or respective owner