Created
July 7, 2013 17:22
-
-
Save rohitkandhal/5944198 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model DialogTest.ViewModels.DeleteConfirmationViewModel | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h3>Delete @Html.DisplayFor(x => x.HeaderText)</h3> | |
</div> | |
@using (Html.BeginForm(Model.PostDeleteAction, Model.PostDeleteController, FormMethod.Post, new { @class = "modal-form form-horizontal" })) | |
{ | |
@Html.ValidationSummary() | |
<!-- Added hidden field so that these values persist when calling POST Action. Otherwise | |
POST action will have all these properties as null --> | |
@Html.HiddenFor( x => x.DeleteEntityId) | |
@Html.HiddenFor(x => x.PostDeleteAction) | |
@Html.HiddenFor(x => x.PostDeleteController) | |
@Html.HiddenFor(x => x.HeaderText) <!-- Though not required in post action but may be in case of error useful--> | |
<div class="modal-body"> | |
<div class="row-fluid"> | |
<div class="control-group"> | |
Do you want to delete this entry? | |
</div> | |
</div> | |
</div> | |
<div class="modal-footer"> | |
<button class="btn btn-danger" type="submit"><i class="icon-trash"></i> Delete</button> | |
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button> | |
</div> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment