Using MVC 3 RTM I\'m getting a strange NullReferenceException:
@helper TestHelperMethod() {
var extra = \"class=\\\"foo\\\"\";
I know it's not the point but if it is just Html.Raw(value) you were hoping to use when finding this question on Google (as I was) according to the source code of System.Web.Mvc.dll all Html.Raw does is:
public IHtmlString Raw(string calue)
{
return new HtmlString(value);
}
So I've just used @(new HtmlString(value)) in my helper which works nicely.