Back to product page

Redirect method


Redirects response to new URL.

Type

Void

Syntax

  • C#
  • VB.NET
Void Redirect(String NewUrl, Boolean TempRedirect);
The Redirect(NewUrl,TempRedirect) syntax has these parts:
NewUrlA String value. New URL (may include other hostname) where client is redirected.
TempRedirectBool. Defines if client receives 'temporary' or 'permanent' redirection notice.

Sub Redirect(ByVal NewUrl As String, ByVal TempRedirect As Boolean)
The Redirect(NewUrl,TempRedirect) syntax has these parts:
NewUrlA String value. New URL (may include other hostname) where client is redirected.
TempRedirectBool. Defines if client receives 'temporary' or 'permanent' redirection notice.

Remarks

This method will redirect client to location you specify. You can send out '301 Moved Permanently' or '302 Moved Temporarily' status code, depending on TempRedirect value. After this method is called, Response is sent to the client and you should not change it anymore.

Platforms

Windows