During this time using Bootstrap+asp.net MVC5 development project, Ajax.actionlink encountered a duplicate commit bug, the code is as follows:
1@model ilist<wfmodel.wf_temp>2 @{3Layout =NULL;4 }5 6<! DOCTYPE html>7 89Ten<meta name="Viewport"Content="Width=device-width"/> One<title> Workflow Template List </title> A<link href="~/content/bootstrap.css"Rel="stylesheet"/> -<script src="~/scripts/jquery-2.1.1.js"></script> -<script src="~/scripts/bootstrap.js"></script> the<script src="~/scripts/jquery.unobtrusive-ajax.js"></script> - -<body> -@Ajax. ActionLink ("Add a workflow template","addtemp","wftemp",Newajaxoptions () + { -Httpmethod="Get" +},New A { at@class ="btn Btn-primary", -data_toggle="modal", -data_target="#myModal" - }) -<br/> -<divclass="table-responsive"> in<tableclass="Table"> -<tr> to<th> Template Name </th> +<th> Submit Time </th> -Description of the <th> template </th> the<th> Template Submitter </th> *</tr> $<tbody>Panax Notoginseng @{ - foreach(varIteminchModel) the { +<tr> A<td> @item. Tempname</td> the</tr> + } - } $</tbody> $</table> -</div> -</body> the -<!--Button Trigger modal--Wuyi@*<buttonclass="btn btn-primary Btn-lg"data-toggle="modal"data-target="#myModal"> the Launch Demo Modal -</button>*@ Wu -<!--Modal-- About<divclass="Modal Fade"Id="Mymodal"tabindex="-1"role="Dialog"aria-labelledby="Mymodallabel"aria-hidden="true"> $<divclass="Modal-dialog"> -<divclass="modal-content"> -<divclass="Modal-header"> -<button type="Button" class="Close"data-dismiss="modal"><span aria-hidden="true">×</span><spanclass="sr-only">Close</span></button> Aclass="Modal-title"Id="Mymodallabel"> Add a template +</div> the<divclass="Modal-body"> - ... $</div> the<divclass="Modal-footer"> the<button type="Button" class="btn Btn-default"data-dismiss="modal"> Cancel </button> the<button type="Button" class="btn Btn-primary"> Save </button> the</div> -</div> in</div> the</div>
How to fix it, httpmethod= "Get" into "Post" You're ready.