Plugin contain these file:
chat.js: chat client should include in master page.
chat.css, screen.css, screen_ie.css: style sheet include in master page also
VIChatControl.dll: have to reference in your web project

include this line in your Web.config
<connectionStrings>
        <add name="connectionString" connectionString="data source=your server;initial catalog=your database name;integrated security=false;persist security info=True;User ID=your db user;Password=your db password" providerName="System.Data.SqlClient"/>
</connectionStrings>

your database must have this table:
CREATE TABLE [ChatMessage](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FromUser] [varchar](255),
	[ToUser] [varchar](255),
	[Message] [ntext],
	[SentDate] [datetime] NOT NULL,
	[Received] [bit] NOT NULL CONSTRAINT [DF_ChatMessage_Received]  DEFAULT ((0)),
 CONSTRAINT [PK_ChatMessage] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

To login to chat and open user list window call VI.VIChat.Client.Online(username) in javascript. username is user loged on in string.

Last edited Nov 18, 2010 at 6:58 AM by minhndm, version 1

Comments

olawale Mar 17, 2011 at 10:58 AM 
Thanx Kevin. It worked. the only challenge i have now is that it's giving the following error "VI is undefined" do u have an idea what might be causing this?

KevinFarrow Mar 10, 2011 at 8:26 PM 
Looks like you've missed out the quotes around the <%=System.Threading.Thread.CurrentPrincipal.Identity.Name%> try this:

<a href="javascript:void(0)" onclick="javascript:VI.VIChat.Client.Online('<%=System.Threading.Thread.CurrentPrincipal.Identity.Name%>');">User 6</a>

olawale Feb 14, 2011 at 11:37 AM 
I used <a href="javascript:void(0)" onclick="javascript:VI.VIChat.Client.Online(<%=System.Threading.Thread.CurrentPrincipal.Identity.Name%>);">User 6</a>
to call the logon username and it's giving me error message 'ade' is undefined. ade is the username i used to logon. Pls tell me what i am doing wrongly.

Thanking u in advance.

olawale Feb 14, 2011 at 9:19 AM 
am still finding it difficult to call VI.VIChat.Client.Online(username) in Javascript. Could you please help out?