SPUtility.RedirectValidate method (String, HttpContext)
Determines whether a URL is suitable for redirection by verifying that it is either relative or resides within the current Web server or portal server.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function RedirectValidate ( _
url As String, _
context As HttpContext _
) As Boolean
'Usage
Dim url As String
Dim context As HttpContext
Dim returnValue As Boolean
returnValue = SPUtility.RedirectValidate(url, _
context)
public static bool RedirectValidate(
string url,
HttpContext context
)
Parameters
url
Type: System.StringThe URL for redirection.
context
Type: System.Web.HttpContextThe current HttpContext object.
Return value
Type: System.Boolean
true if the URL is suitable for redirection; otherwise, false.