- by rj
Hi,
I've come across two recommendations for creating custom html helpers: either extend an existing one, or write your own class.
I'd prefer to keep my custom code separated, it seems a bit sloppy to extend helpers for a decent-size application.
But the benefit I see in extending is that 'This HtmlHelper helper' is passed as a parameter, through which I can get ViewContext.HtmlContext.
My question is, how can I roll my own helper class and still have ViewContext.HtmlContext available to me?
Thanks!