Html
is a form property that maps to an instance of HtmlHelper
. HtmlHelper.Hidden
returns a MvcHtmlString
Html.Hidden("a1", Model.A1);
does nothing as the returned value is not captured. You don't get any errors because it's perfectly valid C# code (capturing the return is optional). Most static analysis tools, however, will warn you about this since it's most likely a bug (as you have discovered).
On the other hand,
@Html.Hidden("a1", Model.A1);
is analagous to
Response.Write(Html.Hidden("a1", Model.A1));
which writes the return value to the HTML response.