Hi Marium,
1. How to know user is online or not
Please try the code below
-
protected override void OnLoad(EventArgs e)
-
{
-
CuteChat.ChatPortal portal = CuteChat.AppSystem.Instance.GetCurrentPortal();
-
lock (portal)
-
{
-
if (portal.IsMessengerStarted)
-
{
-
-
CuteChat.ChatPlaceUser[] users = portal.Messenger.GetAllUsers();
-
foreach (CuteChat.ChatPlaceUser user in users)
-
{
-
-
if (user != null)
-
{
-
label1.Text += user.DisplayName;
-
}
-
}
-
-
}
-
}
-
base.OnLoad(e);
-
}
2. How to chat wiht someone directly (use some link or image)
a. must add the code below in to the page
<script src="CuteSoft_Client/CuteChat/IntegrationUtility.js.aspx?Chat_StartPartialMessenger=1"></script>
b. The code below show you how to chat with the specified user. 'admin' is the name of the user who your want to chat.
<a href="#" onclick="Chat_OpenContact('admin')">UniqueName='admin'</a>
Regards,
ken