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

17 comments :

avnish kumar singh said...

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

Anonymous said...

nice

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?

Amit Singh said...

Sir Please tell me how to encrypt the Password in database

Charan Vitt said...

sample code plz

venkata vinod Grandhi said...

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

prashant manandhar 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?

Mohan R 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

Satheesh S said...

sir guid me to chat application in visualstudio 2010

mohammed aasif said...

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

Give your Valuable Comments

Other Related Posts

© 2010-2012 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.