Setting up chat in redirection mode

Many web parts that belong to the Chat application have the Redirect URL property. This attribute defines the URL of the page where the chat user should be redirected when performing the action the web part is intended for. For example, in the Chat room list web part, you would set the Redirect URL to the page that contains the Chat room messages web part.

Let’s presume that you want to set up chat which will comprise the following pages:

  • Logon page
  • Page with list of chat rooms
  • Chat room page with messages

The following is a step-by-step tutorial how to set up chat on the pages. The procedure is presented on the sample Community site.

Please note that unless instructed otherwise, you can leave all the web parts’ properties at their defaults.


  1. Create a new blank page called Chat. This will be the starting page, which the users will use to enter the chat.
  2. Under the Chat page, create two blank pages called Room list, and Room.
  3. On the Room list page, select the Properties -> Template tab, click Edit template properties and select All ancestor pages in the Page nesting section. Then save the template.
  4. Repeat the previous step on the Room page.

Basic setup

  1. On the Chat page, add the Chat login web part. Set its properties as follows:

    • Redirect URL after entering chat: ~/Chat/Room-list.aspx
    • Redirect URL after logout: ~/Chat.aspx

    This will ensure that users will be redirected to the correct page when logging in and out.

  2. Place the Chat notifications web part on the Chat page.

    This will allow users to see notifications about invitations to rooms and private conversations, as well as other system messages addressed specifically to the current user.

  3. Place the Page placeholder web part on the Chat page.

    The web part, along with the template settings defined previously, will cause the Chat login web part to appear on all subpages, allowing users to log out at any time.

  4. On the Room list page, add the Chat rooms web part. Set the following property:

    • Redirect URL after join: ~/Chat/Room.aspx

    When a user clicks a room in the list, the web part tries to join the user to the room. If that action is successful, the system redirects the user to the specified URL.

  5. Place the Chat send message web part on the Room page.

    This will allow sending messages to the room and its members.

  6. Place the Chat room messages web part on the Room page.

    This web part will display messages from other users in the room, as well as system messages and announcements.

  7. Place the Chat leave room web part on the Room page. Set the following property:

    • Redirect URL after leaving: ~/Chat/Room-list.aspx

    This will provide user a way to exit the room and return to the page with the list of rooms.

Extended setup

After completing the preceding procedure, you will have implemented a functioning multi-page chat with all the basic features. However, this configuration can be extended with additional features. The process is described in the following step-by-step tutorial.

  1. Place the Chat on-line users web part on the Room list page.

    This will enable users to see the list of users on-line in the chat regardless of the room they are in, if any. They will also be able to start a private conversation with any of the on-line users.

  2. Add the Chat room name web part on the Room page.

    This web part will display the name of the room the user is in.

  3. Place the Chat room users web part on the Room page.

    This will allow users in a room to see who else is on-line in the particular chat room and initiate a one-to-one chat session with them.