Sitecore 5.0 API

Context.SetActiveSite Method 

Sets the active site.

[Visual Basic]
Public Shared Sub SetActiveSite( _
   ByVal siteName As String _
)
[C#]
public static void SetActiveSite(
   string siteName
);

Remarks

The current site is normally determined by the HttpRequest module. However if the API is instantiated outside a Http request, it is possible to specify the current site using this methods.

This method is rarely used and should be used with caution.

Situations where this method can be used are: an event from a FileWatcher object or a background thread.

See Also

Context Class | Sitecore Namespace