Sitecore 5.0 API

MainUtil.GetWebItemSource Method (String)

Gets the web item data source from the query string.

[Visual Basic]
Overloads Public Shared Function GetWebItemSource( _
   ByVal sDefault As String _
) As String
[C#]
public static string GetWebItemSource(
   string sDefault
);

Parameters

sDefault
A default path.

Return Value

The value of the path parameter on the query string.

Remarks

If the query string does not contain a parameter named path, the default value is returned.

Example

  string path = MainUtil.GetWebItemSource("/Home");
  IWebItem item = WebFactory.GetItem(path);

See Also

MainUtil Class | Sitecore Namespace | MainUtil.GetWebItemSource Overload List