TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prasad Bhagat
NA
516
234.8k
Page url getting the data after lgoin function success?
Apr 7 2016 7:55 AM
Dear All,
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 .
the login function like bellow
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);
}
});
}
please help me to how to redirect these page to welcome page ..
Reply
Answers (
1
)
How to change the selected menu item bg color after select?
Closing database connection in asp.net C# razor syntax