ASP. NET MVC ajax.actionlink httpmethod= "Get" A duplicate request for a bug

Source: Internet
Author: User
Tags button type actionlink

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">&times;</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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.