Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Best way to redirect page

Posted on 2013-01-07
5
Medium Priority
?
293 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 668 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 668 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 664 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

636 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