Search code examples
asp.netasp.net-mvchtml-helpertagbuilder

internal ToMVCHmlString in TagBuilder


I am looking to write a few helpers in my own assembly modeled after the helpers in System.web.mvc. My problem is that I cannot use the call to Tagbuilder.ToMvcHtlString since it is internal. So if I return a string it wont be ready for asp.net 4 when it comes.

I dont want to add anything to system.web.mvc as that is a given dll.


Solution

  • return MvcHtmlString.Create(tagBuilder.ToString());