Solved

Best way to redirect page

Posted on 2013-01-07
5
278 Views
Last Modified: 2013-01-10
What is the best way to redirect a page in asp.net? This is intranet site.
Is reponse.redirect("mypage.aspx") good enough?
0
Comment
Question by:VBdotnet2005
5 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38752643
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
 

Author Comment

by:VBdotnet2005
ID: 38752847
Should I use Response.Redirect("Mypage.aspx", true) ?
0
 
LVL 20

Accepted Solution

by:
informaniac earned 167 total points
ID: 38753539
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
 
LVL 34

Assisted Solution

by:Paul MacDonald
Paul MacDonald earned 167 total points
ID: 38754695
"Should I use Response.Redirect("Mypage.aspx", true) ?"
You can just type...
   Response.Redirect("Mypage.aspx")
...for the same effect
0
 
LVL 1

Assisted Solution

by:jinsonaf
jinsonaf earned 166 total points
ID: 38758489
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question