//Javascript Code
var userName ="Some Name";
var password="Some Password";$.ajax({
type: "post",
url: "loginCheck.aspx/getData",
data: "userName=" + userName + "&password=" + password,
success: function (data) {
console.log(data);
//returns true or false
if (data == TRUE) {
//Rederict to Profile
} else {
//some alert
}
},
error: function (error) {
console.log(error);
alert(0);
}
});
//C#
/*
Below i am trying to get those ajax values ,but i am not getting it .
*/
public bool getData(){
String userName=Request.Params["userName"]);
String password=Request.Params["userName"]);
/*
User details checking
*/
//finally return true or false
return true;
}I want to get those ajax values in getData() Method At LoginCheck.aspx, but i am not getting values .
Please provide solution for my issue ,thanks in advance.