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

Popular posts from this blog

C# random value from dictionary and tuple -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -