HttpResponse.Redirect Method (String)
Assembly: System.Web (in system.web.dll)
Calling Redirect is equivalent to calling Redirect2 with the second parameter set to true.
Redirect calls End3 which raises a ThreadAbortException4 exception upon completion.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements5.
If the redirected url includes user-entered data, such as
http://www.test.com/newpage.aspx?country=USA
Then, the querystring component should be urlencoded.
Response.redirect("http://www.test.com/newpage.aspx?country=" + HttpUtility.UrlEncode(TheCountry))
This way, the correct url will be generated for countries like
http://www.test.com/newpage.aspx?country=Sri%20Lanka
- 8/5/2006
- teyc