Skip to content

Instantly share code, notes, and snippets.

@alexbeletsky
Created June 18, 2011 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexbeletsky/1033241 to your computer and use it in GitHub Desktop.
Save alexbeletsky/1033241 to your computer and use it in GitHub Desktop.
namespace MyNamespace {
public static class MyHelper
{
public static MvcHtmlString MyHelper(this HtmlHelper helper)
{
return helper.AntiForgeryToken();
}
}
}
// in *.cshtml
@using MyNamespace
@Html.MyHelper()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment