62,046
社区成员
发帖
与我相关
我的任务
分享
[HttpPost]
[AllowAnonymous]
public async Task<ActionResult> Login(LoginViewModel model, string returnUrl)
{
if (!ModelState.IsValid)
{
if (Request.IsAjaxRequest())
{
return Json(new AjaxPostResponse { Succ = false, Message = "参数错误" });
}
return View(model);
}
var result = await SignInManager.PasswordSignInAsync(model.Name, model.Password, model.RememberMe, shouldLockout: false);
foreach (var item in this.Controls)
{
if(item is Button)
{
((Button)item).Click+=new System.EventHandler(this.button1_Click);
}
}
HttpContext.GetOwinContext().Authentication.SignIn