摘要:
Html.BeginForm("ActionName", "ControllerName", FormMethod.Get, new { name = "FormName", id = "FormID" }) 阅读全文
摘要:
处理方法[HttpPost] public ActionResult Index(Models.User model) { if (model.UserName == "admin") { //创造票据 FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(model.UserName, false, 1); //加密票据 string tic... 阅读全文
摘要:
Jquery Ajax方法传值到action<script type="text/javascript"> $(document).ready(function(){ $("#btn").click(function(){ $.ajax({ type: 'POST', url: "/Home/MyAjax", data: { val1: $("#txt1").val(), ... 阅读全文