Skip to content

Instantly share code, notes, and snippets.

@beyond-code-github
Created August 19, 2015 06:29
Show Gist options
  • Save beyond-code-github/ba00446b167453097d2d to your computer and use it in GitHub Desktop.
Save beyond-code-github/ba00446b167453097d2d to your computer and use it in GitHub Desktop.
Generic list markup including added feature with toggle logic
<h1>@Model.ListTitle</h1>
<form action="@Model.PostUrl">
<input type="text" id="name" />
<input type="text" id="notes" />
<input type="submit" id="addButton" value="Add" />
</form>
@if (Model.RequiresBulkUpload) {
<form id="bulkUpload">
<input type="file" id="csvFile" />
<input type="submit" id="startBulkUploadButton" />
</form>
}
<table id="dataTableTarget">
</table>
<script>
$.dataTable("#dataTableTarget", "@Model.TargetUrl", [
{ label: "Name", value: "name" },
{ label: "Notes", value: "notes"} ]);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment