@using (Html.BeginForm())参数示例
原文链接:https://www.cnblogs.com/firstcsharp/p/3238321.html
-
指定表单提交方式和路径等
@using (Html.BeginForm("Index", "Home", FormMethod.Get, new { name = "nbform", id = "nbform" }))
-
指定表单提交为数据方式
@using (Html.BeginForm("ImportExcel", "Stock", FormMethod.Post, new { enctype = "multipart/form-data" }))
-
下面的操作可以防止提交链接后面自带参数
@using (Html.BeginForm("AddDIYBillOfLading", "BillOfLading", new { id ="" }, FormMethod.Post, new { name = "myform", id = "myform" }))