RecentChangesMenu Class
This control generates a list of recently changed wiki pages in the wiki library.
System.Object
System.Web.UI.Control
Microsoft.SharePoint.WebControls.SPControl
Microsoft.SharePoint.WebControls.TemplateBasedControl
Microsoft.SharePoint.WebControls.RecentChangesMenu
System.Web.UI.Control
Microsoft.SharePoint.WebControls.SPControl
Microsoft.SharePoint.WebControls.TemplateBasedControl
Microsoft.SharePoint.WebControls.RecentChangesMenu
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
RecentChangesMenu
Description
The Microsoft.SharePoint.WebControls.RecentChangesMenu inherits from the Microsoft.SharePoint.WebControls.TemplateBasedControl class which allows deriving specific types of template-rendered controls.
The RecentChangesMenu control is most evident in the shipped SharePoint software on the left hand side of Wiki pages noted with the header "Last Modified". This placement can be examined further by opening the template located at \TEMPLATE\DocumentTemplates\wkpstd.aspx. Within this file, you will find a SharePoint:RecentChangesMenu tag which represents this control call.
RecentChangesMenu functions by building two separate controls that simply build out links. One control is of type System.Web.UI.WebControls.HyperLink that points to the "Recent Changes" WebForm located at /Forms/RecentChanges.aspx. The second control is of type Microsoft.SharePoint.WebControls.SPLinkButton that points to the "All Pages" URL provided by the SPList.DefaultViewUrl property for the current SPContext.
Usage Scenario
The primary usage of RecentChangesMenu is found in default document templates. However, if the appropriate context is obtainable, it is feasible to use the object in custom controls.
In the below, I am demonstrating creating a new RecentChangesMenu control within CreateChildControls, and then adding it to the current instance control collection.
C# Code Example
protected override void CreateChildControls()
{
RecentChangesMenu menu = new RecentChangesMenu();
Controls.Add(menu);
}
Visual Basic .NET Code Example
Protected Overloads Overrides Sub CreateChildControls()
Dim menu As New RecentChangesMenu()
Controls.Add(menu)
End Sub
The Microsoft.SharePoint.WebControls.RecentChangesMenu inherits from the Microsoft.SharePoint.WebControls.TemplateBasedControl class which allows deriving specific types of template-rendered controls.
The RecentChangesMenu control is most evident in the shipped SharePoint software on the left hand side of Wiki pages noted with the header "Last Modified". This placement can be examined further by opening the template located at \TEMPLATE\DocumentTemplates\wkpstd.aspx. Within this file, you will find a SharePoint:RecentChangesMenu tag which represents this control call.
RecentChangesMenu functions by building two separate controls that simply build out links. One control is of type System.Web.UI.WebControls.HyperLink that points to the "Recent Changes" WebForm located at /Forms/RecentChanges.aspx. The second control is of type Microsoft.SharePoint.WebControls.SPLinkButton that points to the "All Pages" URL provided by the SPList.DefaultViewUrl property for the current SPContext.
Usage Scenario
The primary usage of RecentChangesMenu is found in default document templates. However, if the appropriate context is obtainable, it is feasible to use the object in custom controls.
In the below, I am demonstrating creating a new RecentChangesMenu control within CreateChildControls, and then adding it to the current instance control collection.
C# Code Example
protected override void CreateChildControls()
{
RecentChangesMenu menu = new RecentChangesMenu();
Controls.Add(menu);
}
Visual Basic .NET Code Example
Protected Overloads Overrides Sub CreateChildControls()
Dim menu As New RecentChangesMenu()
Controls.Add(menu)
End Sub
- 6/3/2010
- Adam Buenz - MVP