Skip to content

Instantly share code, notes, and snippets.

@Boztown
Last active December 31, 2015 23:19
Show Gist options
  • Save Boztown/8059137 to your computer and use it in GitHub Desktop.
Save Boztown/8059137 to your computer and use it in GitHub Desktop.
@model ViewModels.CollectionViewModel
@{
string actionKeyword = ViewData["ActionKeyword"].ToString();
}
@using (Html.BeginForm("edit", "collection", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<label class="control-label">Name:</label>
<div class="control-group">
@Html.TextBoxFor(model => model.Name, new { @class = "span12", id = "collection-name" })
@Html.ValidationMessageFor(model => model.Name, "A name is required", new { @class = "label label-important" })
</div>
<label class="control-label">Description:</label>
<div class="control-group">
@Html.TextAreaFor(model => model.Description, new { @class = "span12", id = "collection-description" })
</div>
<label class="checkbox">Published @Html.CheckBoxFor(model => model.Published)</label>
@Html.HiddenFor(model => model.Id)
<div class="form-actions">
<input type="submit" id="collection-submit" name="collection-submit" class="btn-large btn-primary" value="@actionKeyword collection" />
</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment