Solved

Best way to redirect page

Posted on 2013-01-07
5
287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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