If you use the HTML helper to output text to the browser, why not return the string to it and, in your opinion, do something like ...
<%=Html.YourExtension() %>
This makes it much more verifiable.
Kindness,
Dan
EDIT:
Modification will be a signature change
public static void YourExtension(this HtmlHelper html)
{
...
Response.Write(outputSting);
}
to
public static string YourExtension(this HtmlHelper html)
{
...
return outputSting;
}
source
share