Home

Testing HtmlHelpers in LinqPad

edited June 2012
I would like to be able to use LinqPad as a test bed for HtmlHelpers. Any help would be appreciated.

Here's what I have so far...

References
System.Web.dll
System.Web.Mvc.dll
System.Web.Routing.dll

Namespace Imports
System.Web.Mvc

var viewContext = new ViewContext(); var viewDataContainer = (IViewDataContainer) new object(); var html = new HtmlHelper(viewContext, viewDataContainer); html.ActionLink("Test", "Test", "Test").Dump();

It fails when I attempt to cast an object to IViewDataContainer.

Thanks

Comments

Sign In or Register to comment.