Why isn't my razor helper being executed inside a Using statement?

asp.net-mvc, asp.net-mvc-3, razor, vb.net

Solution

You need `@` symbol in front of the helper method.

@Using Html.BeginForm
    @SimpleMessage
End Using

Problem

This view: ``` @Using Html.BeginForm SimpleMessage End Using @Helper SimpleMessage() @<p>This is a simple message</p> End Helper ``` Results in ``` <form action="/Controller/Action" method="post"></form> ``` But ``` @* Now let's not call it from within a using *@ @SimpleMessage @Helper SimpleMessage() @<p>This is a simple message</p> End Helper ``` Results in ``` <p>This is a simple message</p> ``` Why doesn't my helper work while inside my `Using Html.BeginForm`?

Original source