Skip to content

Instantly share code, notes, and snippets.

@dgg
Created August 30, 2013 07:42
Show Gist options
  • Save dgg/6387243 to your computer and use it in GitHub Desktop.
Save dgg/6387243 to your computer and use it in GitHub Desktop.
Model binding dynamic collections. III View code
@using (Html.BeginForm("Index", "Sort", FormMethod.Post, new{role = "form", @class="form-inline"}))
{
<h1>Sorting</h1>
<table id="table-sortable" class="table table-bordered table-striped table-hover table-responsive">
<caption>Sortable things</caption>
<thead>. . .</thead>
<tbody>@Html.DisplayFor(m => m.Things)</tbody>
</table>
<div class="form-group">
<input type="submit" name="discard" value="Discard" class="btn btn-default" />
</div>
<div class="form-group">
<input type="submit" name="save" value="Save" class="btn btn-primary" />
</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment