Here is my JavaScript block:
<script>
var u;
var p;
function login() {
u = $("#userNameID").val();
p = $("#passwordID").val();
$.ajax({
type: "POST",
url: "Login.aspx",
data: { username: u, password: p},
success: function () { alert("success!!!") }
});
}
</script>
At server side after the post call I try to retrive values this way:
protected void Page_Load(object sender, EventArgs e)
{
string user = Request.QueryString["username"];
string pswrd = Request.QueryString["password"];
}
But both values are null.
What I am missing here?