am Implementing a login page using asp.net ajax with ajax jquery call .witih web method,am passing USERNAME AND PASSWORD and getting response as userdata .if the userdata!=null then i would like to redirect the page from login to welcome .but if username password are success then also data was displaying in URL.and not redirecting to any page .
am using asp.net ,ajax jquery .
function Login() {
debugger
var txtuserid = $("#txtuserid").val();
var txtpassword = $("#txtpassword").val();
$.ajax({
type: "POST",
url: "Index.aspx/AuthenticateUsers",
data: "{'UserId' : " + JSON.stringify(txtuserid) + ",'Password' : " + JSON.stringify(txtpassword) + "}",
contentType: "application/json; charset=utf-8",
datatype: "jsondata",
async: "false",
success: function (ResultSet) {
debugger
if (ResultSet != null) {
sessionStorage.setItem("UserName", txtuserid);
window.location = "Reports.aspx";
}
},
error: function (Response) {
alert(Response.d.ResultStatus.StatusInd + " " + Response.d.ResultStatus.StatusMsg);
}
});
}