Skip to content

Instantly share code, notes, and snippets.

@oclockvn
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oclockvn/645744b80b858703be8b to your computer and use it in GitHub Desktop.
Save oclockvn/645744b80b858703be8b to your computer and use it in GitHub Desktop.
@using BootstrapModalExample.Models
@model Item
@using (Html.BeginForm("Add", "EStore", FormMethod.Post, htmlAttributes: new { @class = "form-add" }))
{
@Html.AntiForgeryToken()
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Add Item</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="Name">Name</label>
@Html.TextBoxFor(m => m.Name, htmlAttributes: new { @class = "form-control" })
</div>
<div class="form-group">
<label for="Price">Price</label>
@Html.TextBoxFor(m => m.Price, htmlAttributes: new {@class="form-control" })
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Add</button>
</div>
</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment