I am using asp.net and i am trying to login from the fancy box. I have code sample like this :
function (LoginResponse) {
$.each(LoginResponse, function () {
if (this["IsLogin"] == "true") {
window.location.reload(true);
window.location.href = "Account/MyProfile.aspx";
}
else {
jAlert('Warning!', 'Invalid login Credintials', 'Please enter valid Username and Password..', 'yellow');
}
clear_form_elements('#UserLoginSection'); //Clears the element of the form
});
}
);
Some time it goes well with this address "Account/MyProfile.aspx" But some time The Address wrong and in the address bar something like this come again and again "Account/Account/MyProfile.aspx" There should not be Double Account meaning "Account/MyProfile.aspx" should be there. and I have tried to remove Account in the javascript function above But some time it works well but some time it does not. What i have to do please help me.