Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • 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
 
Obadiah ChristopherCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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