Share via


SPViewContext.RedirectIfNecessary Method

Performs URL redirection to the root folder of the view when the content type of the root folder differs from the content type of the view.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub RedirectIfNecessary
'Usage
Dim instance As SPViewContext

instance.RedirectIfNecessary()
public void RedirectIfNecessary()

Remarks

The RedirectIfNecessary method silently fails if the NeedToRedirect property is false.

See Also

Reference

SPViewContext Class

SPViewContext Members

Microsoft.SharePoint Namespace