public class LoginAuthenticateArgs { public string Username {get; set;} public string Password {get; set;} } [HttpPost] public int LoginAuthenticate(LoginAuthenticateArgs _Login) { using(Product _Product = new Product()) { var _UserLogin = _Product.Login .where(c=>c.Username == _Login.Username && c.Password == _Login.Password) .singleordefault(); if(_UserLogin != null) { return _UserLogin .ID; } } }
function LoginClick(){ var data = { Username: $("#UsernameTextbox").val(), Password: $("#PasswordTextbox").val() }; Ajax("Controller/function", data, Success, Fail, "post"}; }; function Success(response){ // I don't know what to do now and how to pass the response // to redirect page };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)