Click here to Skip to main content
15,069,297 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I tried this code to redirect from asp.net page to html
Responce.Redirect("index.html");
but it won't redirect. what can I do ?
Posted
Updated 15-Sep-21 12:10pm
v2
Comments
DamithSL 21-Jun-14 1:25am
   
Where your html page located related to your website root directory?
   
If the HTML page is in the same directory as the aspx page, then only it would work. Otherwise you have to provide proper relative url.
[no name] 21-Jun-14 6:20am
   
Add complete url in Response.Redirect

Ex. Response.Redirect("http://mywesite.com/index.html")

1 solution

Hello friend, In addition to the other suggestions, please make sure that you spell it correctly. I'm not sure if you made the typo here only:
C#
Responce.Redirect("index.html");

It should be:
C#
Response.Redirect("index.html");

- DD
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900