• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

Best way to redirect page

What is the best way to redirect a page in asp.net? This is intranet site.
Is reponse.redirect("mypage.aspx") good enough?
0
VBdotnet2005
Asked:
VBdotnet2005
3 Solutions
 
Paul MacDonaldDirector, Information SystemsCommented:
Depends on what you're trying to accomplish.  A 301 redirect might be appropriate, or just having a page do a Response.Redirect().  

Is this something you want to do inline with code, or are you permanently moving a page?
0
 
VBdotnet2005Author Commented:
Should I use Response.Redirect("Mypage.aspx", true) ?
0
 
informaniacCommented:
You use that option when you put the Response.Redirect inside a try/catch. When Response.Redirect is inside a try / catch, if u do not add the second parameter, it will generate a Stack exception.
0
 
Paul MacDonaldDirector, Information SystemsCommented:
"Should I use Response.Redirect("Mypage.aspx", true) ?"
You can just type...
   Response.Redirect("Mypage.aspx")
...for the same effect
0
 
jinsonafCommented:
There is Server.Transfer() and Response.Redirect(). Server.Transfer is perferable in the situations where the websites are in the same server itself.

To know more about the advantages and disadvantages of these two visit this Link
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now