Invite
The Invite server control lets a site visitor invite people to join a site or become a colleague. The control displays a dialog box that prompts for several email addresses. The dialog includes an optional message, which appears in the body of the email. The site visitor can edit or delete the message.
NOTE: Messages are defined in the Workarea. For more information, see Generating email Invitations for Community Management.
Invitations have a single "from" email address. Its default value is [email protected]
. Your site administrator should change it to one that is appropriate for your organization. To change the "from" email address for invitations, open your site’s web.config
file and change the value of following key.
<add key="ek_InvitationFromEmail" value="[email protected]"/>
WARNING! The default From email address used to send all invitations is [email protected]. Episerver strongly recommends changing this address. See also: Generating email Invitations for Community Management.
Inserting the Invite server control onto a page
Prerequisite
You must have installed the server controls. See Installing server controls into Visual Studio Toolbox.
- In Visual Studio, choose View > Toolbox.
- Click the Ektron server control tab to display the server controls.
- Drag the Invite server control and drop it into the desired location on the page.
NOTE: You also can place the cursor on the page where you want the server control, then double click the server control that you want.
<CMS:Invite ID="Invite1" runat="server" />
- Click on
Invite
in the code to display and modify the control’s properties using the Properties window of Visual Studio. The page is updated as you modify the property values.
Invite properties
The following are Ektron-specific server controla server control uses API language to interact with the CMS and Framework UI to display the output. A server control can be dragged and dropped onto a Web form and then modified. properties. For information about native .NET properties such as font, height, width and border style, use Visual Studio® help.
- DisplayXslt (String)
If desired, enter a relative or absolute path to an Xslt that determines the display of the page.
WARNING! Files stored in the
siteroot\Workarea
folder are overwritten (or deleted) when you upgrade Ektron. To avoid problems, copy the default file to a folder outside thesiteroot\workarea
folder then edit it. If there is no default file, create the file outside thesiteroot\workarea
folder. Next, in this property, enter the path to that file relative to the site root folder.WARNING!
If you enter a valid EkML file at the MarkupLanguage property, the Displayxslt property value is ignored. - DoInitFill (Boolean)
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, Fill is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in code-behind and have it render with your changes shown.
- FriendMessageId (Long)
The ID of the message to send in the link section of a FriendInvitation type email. This message is defined in the Workarea > Settings > Community Management > Messages. If set to 0 (zero), the server control uses the default message.
- Hide (Boolean)
Hides or displays the output of the control in design time and run time.
- True. Hide the control output.
- False. Display the control output.
- InviteMessageId (String)
The ID of the message to send in the link section of a GroupInvitation or FriendInvitation email. This message is defined in the Workarea > Settings > Community Management > Messages. If set to 0 (zero), the server control uses the default message.
- Language (Integer)
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
- OptionalMessageText (String)
The body text of the email message. The text appears in the Invite server control’s dialog box and can be edited by site visitors when they use the Invite control.
- Stylesheet (String)
Specify the path to a style sheet for use with this server control. Leave blank to use the default style sheet. To use a custom style sheet, place it in a folder outside the
siteroot\workarea
folder then edit it. Next, in this property, enter the path to the custom style sheet relative to the site root folder.NOTE: If you enter a valid EkML file at the
MarkupLanguage
property, theStylesheet
property is ignored. - SuppressWrapperTags (Boolean)
Suppresses the output of the span/div tags around the control.
- True. Suppress wrap tags.
- False (default). Allow wrap tags.
- WrapTag (String)
Lets a developer specify a server control’s tag.
- Span (default). Designate an inline portion of an HTML document as a span element.
- Div. Apply attributes to a block of code.
- Custom. Lets you use a custom tag.