c# - Javascript redirect works in chrome but not IE -
the below javascript script registry works in chrome without issue. when used ie url missing /
.
for example, chrome correctly land on //sever-name/submit.aspx
in ie land on //sever-namesubmit.aspx
does have suggestions fixing issue
scriptmanager.registerstartupscript(this, this.gettype(), "redirect", "alert('your request submitted successfully. redirected confirmation page.'); window.location='" + request.applicationpath + "submit.aspx';", true);
shouldn't be:
window.location='" + "/" + request.applicationpath + "/" + "submit.aspx';", true);
also, in javascript, "/" used escape character. may have escape escape charecter well: var link = "site.com//mypage.aspx"
Comments
Post a Comment