I’ve created a few html helper methods for asp.net mvc that I would like to use between projects. Does anyone know of a way to put them in their own project file so I can include that in other solutions?
I’ve tried this but it doesn’t seem to work. When I try to use the helper it complains that htmlHelper is not being set. It isn’t necessary to set this when the helper extension lives in the MVC project, so I’m clearly missing something.
Okay, I’m feeling kinda silly about this, but it was something painfully obvious.
I had added references to System.Web.Extensions and System.Web.MVC. Apparently though it is really important to remember to add a reference for System.Web. Once I did that, good to go.
So, there you have it!