For every action is reported a detailed description and examples of use via code (C #). Note that in all the examples below you'll need to add a reference to
Evolution.dll to be able to compile the code.

Access is Denied action

This action redirects the user to the standard SharePoint "Access Denied" page.

This action requires the specification of a condition associated.

Similarly to what can happen by making use of actions Not found and
Transfer to an error page, this action may be used to manage the
declarative security of the Web page: by choosing as condition the assertion
Current user, for example, you can ensure that all users who do not belong to a particular user group (SharePoint or Active Directory) automatically receive an access denied message.

The following code samples show how to use the Page Action Web Part to redirect all users who do not belong to the
SP_GROUP_NAME SharePoint group to the standard SharePoint "Access Denied" page.

Not found action

This action displays the default 404 error message (HTTP 404 Not Found) to the user. This action requires the specification of a condition associated.

Similarly to what can happen by making use of actions Access is denied and
Transfer to an error page, this action may be used to manage the
declarative security of the Web page: by choosing as condition the assertion
Current user, for example, you can ensure that all users who do not belong to a particular user group (SharePoint or Active Directory) automatically receive a 404 (page not found) error message.

The following code samples show how to use the Page Action Web Part to show the 404 error page to any users who do not belong to the
SP_GROUP_NAME SharePoint group.

Redirect to action

You can use this action whenever you want to direct the user to a different page. For example, you might create a landing page that determines the user's application role membership, and based on that information you can redirect them to an appropriate
page. Or, based on the contents of a query string issued by the user's browser, you might redirect them to a page that can process the query string.

The action supports parameters that enable you to specify the URL of the target page (as plain text or using a
!$-expression) and the redirect behavior. This action requires the specification of a condition associated.

The possible redirect behaviors are the following:

Direct, the user will be redirected to the specified URL.

Relative to layouts, the specified URL is considered relative to the ´_layouts´.

Use Source, the URL to which the user is redirected will be read from the querystring of the original request. The new URL will be the value of one of these querystring parameters:
Source, NextUsing or NextPage. If none of these parameters has a value, will be used the specified URL. If, however, has not been specified any URL (optional with this method of redirect), the redirect will not happen.

The following code samples show how to use two Page Action Web Parts to redirect each user to a particular Web page according to his membership to the "Members" or "Owners" SharePoint groups of the Web site.

Transfer to an error page action

This action redirects the user to the built-in error page provided by Windows SharePoint Services.

The action requires the specification of a condition associated and accepts a parameter for the error message to be displayed. The error message can be a simple text or a
!$-expression.

Similarly to what can happen by making use of actions Access is denied and
Not found, this action may be used to manage the
declarative security of the Web page: by choosing as condition the assertion
Current user, for example, you can ensure that all users who do not belong to a particular user group (SharePoint or Active Directory) are automatically redirected to the SharePoint error page.

The following code samples show how to use the Page Action Web Part to show the error page to all users not belonging to the
SP_GROUP_NAME SharePoint group. The error message specified for the action uses a
!$-expression to get the current user name.

Show contents action

This action can be used to add formatted text, tables, hyperlinks, and images to a Web Part Page, similarly the Content Editor Web Part. Unlike the Content Editor, however, this action allows the user to mix ASP.NET controls and
!$-expressions to the text.

There are three ways to add objects to the content displayed by the action:

Rich Text Editor. You can use the Rich Text Editor to type formatted content automatically without prior knowledge of HTML syntax. The Rich Text Editor accepts
!$-expressions but can not be used to insert ASP.NET controls. Choose the
Source Editor to add ASP.NET controls.

Source Editor. Using this editor, you can enter or modify HTML source code,
!$-expressions or ASP.NET controls.

Content Link. Instead of editing content, you can link to existing content by entering a hyperlink to a text file containing HTML source code,
!$-expressions or ASP.NET controls. You can use an absolute URL or a relative URL. In any case, the URL can contain
!$-expressions.

The process of rendering the contents of the action, goes through two stages of parsing:

The content resulting from the first step is then subjected to the parsing of any ASP.NET controls by using the method
ParseControl of the class
TemplateControl. The text cannot contain any code, because the method ParseControl never causes compilation.

The result of the two stages process is always a Control object. whose rendering is the final content displayed by the action.

The following code must be added through the Source Editor and shows how to use objects of type ASP.NET
Panel and
!$-expressions to render different information depending on the belonging of the current user to one of the main groups of the site (Visitors, Members, Owners):

<asp:PanelRunat="server"ID="Panel1"Visible="!$ CurrentWeb.AssociatedVisitorGroup.ContainsCurrentUser $">
The current user is a Visitor.
</asp:Panel><asp:PanelRunat="server"ID="Panel2"Visible="!$ CurrentWeb.AssociatedMemberGroup.ContainsCurrentUser $">
The current user is a Member.
</asp:Panel><asp:PanelRunat="server"ID="Panel3"Visible="!$ CurrentWeb.AssociatedOwnerGroup.ContainsCurrentUser $">
The current user is a Owner.
</asp:Panel>

The following code samples show how to use the Page Action Web Part to generate a report page on the current user data through the action "Show contents" and the use of
!$-expressions and ASP.NET controls.

The following code samples show how to load the contents of the action from a text file contained in the document library "Documents". The URL uses an
!$-expression to dynamically obtain the full address of the Web site.

Hide page elements action

This action hides one or more of the following elements of the Web page:

Description

Element

Site Actions menu

Quick Launch menu 1

Recycle Bin link

View All Site Content link

Create Page Site Actions menu item

Edit Page Site Actions menu item2

Global navigation breadcrumb

Search box area

Main breadcrumb

1 When the Quick Launch menu is hidden, the space occupied by the Web Parts of the page expands to the entire width of the page.2 When the Edit Page menu item is hidden, the Show Page Editing Toolbar item is also hidden.

The following code samples show how to use the Page Action Web Part to hide unconditionally the Quick Launch menu and the Site Actions menu of the page.

The property PageElements of the class HidePageElementsAction accepts a combination of one or more elements of the bit field
PageElements, combined with a bitwise OR operation. The definition of PageElements is as follows:

Manage Web Parts action

You can use this action to hide or make visible the other Web Parts hosted on the page. Similar to what is achieved by specifying the standard SharePoint Target Audiences for one or more Web Parts on a Web page, binding this action to an appropriate condition
(complex as desired) imposes a rule of visibility / hiddenness to the selected Web Parts, a rule that can be far more complex than determining if the current user belongs to one or more groups of users.

To specify which Web Parts of the page show or hide, click the button Select Web Parts… to open the "Web Part list" dialog box, then mark the appropriate check boxes, selecting the action to be taken for each Web Part.

The following code samples show how to use the Page Action Web Part to show different Content Editor Web Parts depending on the belonging of the current user to one of the main groups of the site (Visitors, Members, Owners):