@using (Html.BeginForm("DeleteConfirmed", "Thomson")) { @Html.AntiForgeryToken() <div style="float:left;" class="panel123 col-sm-4"> <div class="form-group"> @Html.LabelFor(a=>a.UName) @Html.TextBoxFor(a => a.UName) @Html.ValidationMessageFor(a => a.UName) </div> <div class="form-group"> @Html.LabelFor(a=>a.Password) @Html.PasswordFor(a => a.Password) @Html.ValidationMessageFor(a => a.Password) </div> <div align="center"> <input type="submit" value="Submit" id="btnSubmit" class="btn-default" /> </div> <div> <input type="submit" value="Delete" id="btnDelete" class="btn-default" /> </div> @Html.ValidationMessage("CustomError") @Html.ValidationSummary(true) </div>
<input name="submit" .... />
public Action DeleteConfirmed(YourModelType model, string submit) { // the value of "submit" will be "Submit" or "Delete" depending on which button was pressed }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)