Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Chatting Application in Asp.net using C# with ChatJS Plugin

Apr 21, 2014
Introduction

Here I will explain jQuery chatting application in asp.net using c# with example. By using jQuery ChatJS plugin we can implement chatting application like FaceBook in asp.net using c#. ChatJS is a full-featured, lightweight, Facebook style jQuery plugin for instant messaging. ChatJS also comes with a server side implementation for ASP.NET/SignalR out of the box.

Description:
  
In previous article I explained
6 jQuery News ticker plugin examples, 4 SpellChecker Plugin examples, 11+ best jQuery Scroll to top plugins, 8 jQuery clock plugin examples and many articles relating to jQuery Plugins, JQuery, Ajax, asp.net, SQL Server etc. Now I will explain how to implement chatting application like facebook in in asp.net using c# with jQuery.

ChatJS chat implemented with two script files one is jQuery.chatjs.js plugin it depends completely on client side. In order to implement the interface between jquery.chatjs.js and the server, you need an adapter. The first one, jquery.chatjs.signalradapter.js, is meant to be used with ASP.NET and SignalR. This is the preferable way for working with ASP.NET. The second one is jquery.chatjs.longpollingadapter.js which is the generic client-side implementation. This adapter can work with whatever server-side implementation you use, like PHP, Java or NodeJS, as long as the proper end-points are implemented.

By using chatjs plugin once we setup server side it’s very simple to write clientside code that will be like as shown below


$.chat({
// your user information
user: {
Id: 3,
Name: 'John Silver',
ProfilePictureUrl: 'http://www.foo.com/avatar/123'
},
// text displayed when the other user is typing
typingText: ' is typing...',
// the title for the user's list window
titleText: 'ChatJS demo chat',
// text displayed when there's no other users in the room
emptyRoomText: "There's no one around here.",
// the adapter you are using. There are 2 implementations out of the box:
// SignalRAdapter and LongPollingAdapter (server independent).
adapter: new SignalRAdapter()
});
The first thing to do is to determine which adapter you want to use. The adapter is the piece of code that will determine how the client will communicate to the server. ChatJS comes with two adapters and an ASP.NET sample that supports both. If you are working with ASP.NET, it's highly recommended that you use SignalR. ASP.NET SignalR is a new library for ASP.NET developers that make it incredibly simple to add real-time web functionality to your applications.

Demo                           


If you want more details related this application check this link jQuery Chatjs Plugin and download sample code examples from here jQuery Chatjs Plugin

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

47 comments :

Unknown said...

Sir can you guide me to dynmically bind data in jquery i am new plz guide me sir step by step...

Manoj said...

Really Nice !!

b@!_u said...

the sample in the web site has mvc implementation. do you have sample that is implemented in webforms?

Unknown said...

Sir Please tell me how to encrypt the Password in database

Unknown said...

sample code plz

Unknown said...

hi sureshsir,
i want one application to convert speech to text in asp.net if u know plz help me

Unknown said...

i wish there is complete demo for it

Anonymous said...

hi can any tell me how to run the application

Anonymous said...

can i know where it is

Anonymous said...

how to dwnld this source code?

Unknown said...

Sir,how to bind dynamic users in asp.net, sir im n trouble, i hope u will help

SRINIVASA PRABHU said...

It's nice code

Kru...;-) said...

sir It doesn't opens in below 4.5 v of .net plz sir do something i need this code...

Anonymous said...

What does it mean by "setting the server side" sir and can you tell me what are the steps to be performed on downloading the chatjs plugin ? I am new to .Net sir please help

Unknown said...

sir guid me to chat application in visualstudio 2010

mohammed aasif said...

were is the source code .. jQuery Chatjs Plugin is not working

ಶ್ರವಣ್ ಕುಮಾರ್ said...

Please share the solution to my mail : santuchitloor@gmail.com

Thanks in advance

Prashant Sahu said...

hi sir
i want to make forum like facebook in asp.net with c#.
plz sir help me ,it is required in my project

Anonymous said...

Dear sir,
I want to implement chat plugin in my project so sir please explain properly .
that i am understand .

otherwise mail me dummy code its urgent.
abhipatil186@yahoo.com.

Thanking you,

Anonymous said...

Hi sir, Please mention step by step to get used...

Unknown said...

Hi Sir,How to write code SignalR Adafter .Please Reply to me.

Anonymous said...

nice @

Unknown said...

Sir please give me the source code of this application. I need it very urgently. My Email Address is mailtoshivam786@gmail.com

Please Sir.

Unknown said...

please send me the full code of this application i need it urgently.
kmkavitra@gmail.com

Test said...

Dear Suresh i want to create chating web application which could be used on system connected via lan so please help me..............

Murali said...

Dear suresh please send me example application in chat.js to my email pilla.murali89@gmail.com
it would be very helpful to me

Unknown said...

i want to make chatting applicatio c# can you help me???

Unknown said...

pls guide me how to connect db to signalR

Anonymous said...

plz post full chat application code...

Anish Kumar said...

giv the full chat application...

SAMIR R. BHOGAYTA said...

hi.. can we maintain this chat within every page of a whole web application ?

SAMIR R. BHOGAYTA said...

Because when I am entering any text then go to another page it's removed. So, can we maintain it like facebook chat app ?

Anonymous said...

good article

Sunil Pal said...

Hi Suresh, Could u please let me know how multiple chats will b possible in Chart Js
Please suggest !!! Will be a great help

Anonymous said...

please send me the full code of this application i need it urgently.
aragorn.ellessar@gmail.com

Anonymous said...

hi sir i want to implement this code in to my asp.net website so please help me how can i implement

Unknown said...

Dear sir,
I want to implement chat plugin in my project so sir please explain properly .
that i am understand .

otherwise mail me dummy code its urgent.
nilesh.b.amrutkar@gmail.com

Thanking you,

greetings said...

hi sir how to add user in this chat ?

greetings said...

how to add uesr Id and also add friend ?????

Atul Srivastava said...

Please provide sample code using MVC, SignalR and Chat.js It'll really be a great help for me.

Unknown said...

plz i'm new ,how can i use a signalr because not work for me

Unknown said...

sir Nice Code

Pra said...

I want total code sir Plz..

Unknown said...

sir i am using this its very good i modified this as i want
but not able to refresh selected user chat window

Plz help me on this ..
thank in advance..

Unknown said...

This is good one. Can i get this code???

Unknown said...

plz send code plz

Vamshi said...

Please send me the code for my mail id.
vamshidharbandaru@gmail.com

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.