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)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
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)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
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.