Wrox Programmer Forums
|
BOOK: Beginning ASP.NET Web Pages with WebMatrix
This is the forum to discuss the Wrox book Beginning ASP.NET Web Pages with WebMatrix by Mike Brind, Imar Spaanjaars ; ISBN: 978-1-1180-5048-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET Web Pages with WebMatrix section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 14th, 2013, 05:59 PM
Registered User
 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Response.RedirectPermanent Help

I read the part of Chap 13 about redirection, but got confused.

Can anyone simply show me how to use the Response.RedirectPermanent command? I so miss the Response.Redirect("abc.com") of the good old days.

Thank you,
Dave.
 
Old February 15th, 2013, 01:39 AM
Wrox Author
 
Join Date: Dec 2011
Posts: 57
Thanks: 1
Thanked 19 Times in 19 Posts
Default

You can still use Response.Redirect in ASP.NET. The difference is that Response.Redirect issues an HTTP status code of 302 which tells the user agent that the originally requested resource has been moved temporarily, whereas Response.RedirectPermanent issues an HTTP status code of 301, which tells the user agent that the originally requested resource has a permanent new address.

You use them in an identical way:

Code:
Response.Redirect("~/thanks.cshtml");
Or

Code:
Response.RedirectPermanent("~/newpage.cshtml");
 
Old February 15th, 2013, 03:26 AM
Registered User
 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Thank you very much!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Thank you for Instant Response jack_hilary BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 September 27th, 2009 07:55 AM
response of AT Commands bobwith5 .NET Framework 2.0 0 October 31st, 2007 08:54 AM
response.redirect sarah lee ASP.NET 1.0 and 1.1 Basics 1 October 27th, 2006 08:57 AM
response.redirect ava_h .NET Framework 2.0 0 October 18th, 2006 10:21 PM
i need a response to my q..:-) noor ASP.NET 1.0 and 1.1 Basics 1 January 14th, 2005 05:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.