Link to home
Start Free TrialLog in
Avatar of MikeMCSD
MikeMCSDFlag for United States of America

asked on

Redirect page when it is loaded

I want this page: default.htm  to  redirect immediately to default.aspx
when it is loaded.  What is the best way to do this?
Avatar of Tim_Heldberg
Tim_Heldberg

You can use:
<% Response.Redirect(default.aspx) %>

or
location.replace(default.aspx);
Avatar of MikeMCSD

ASKER

thanks tim . .

can :  <% Response.Redirect(default.aspx) %>  be used in a htm page?
No, I dont think that it will.
That is where the location.replace method works well.

Just remember to place it in script tags:

<script>
location.replace("ccccc");
</script>
ASKER CERTIFIED SOLUTION
Avatar of Tim_Heldberg
Tim_Heldberg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial