Skip to content

Instantly share code, notes, and snippets.

@nootn
Created August 15, 2012 08:32
Show Gist options
  • Save nootn/3357639 to your computer and use it in GitHub Desktop.
Save nootn/3357639 to your computer and use it in GitHub Desktop.
MVC Mega Forms quick start guide - Form Layout
@using (Html.BeginControlGroup())
{
@Html.ControlLabelFor(m => m.Input01)
using (Html.BeginControls())
{
@Html.EditorFor(m => m.Input01)
using (Html.BeginHelpInline())
{
@Html.ValidationMessageFor(m => m.Input01)
}
}
}
@Html.ControlBundleFor(m => m.Input01)
<div class="control-group">
<label class="..." for="Input01">Text input</label>
<div class="controls">
<input type="text" id="Input01">
<p class="....">Supporting help text</p>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment