Click here to Skip to main content
16,015,583 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
While I have been using ASP.NET with C# for quite some time, I am trying to create a chat room on my site for the first time. The net is full of codes for chat rooms but I could not figure out any code tutorial specific to my needs. I want a chat room where

1. users can communicate with administrator, not with each other.
2. users or administrator can pass on document/ images during conversation.
3. The record of chat should be stored in Sql server.
4. If the administrator is off line, the users should be able to leave a message for administrator.
5. There should be a signal / sound whenever a message is passed during chat with option to mute the sound

I just don't want to copy any code and use it on my site. I want to learn the basic principles and logic so that I can modify the chat code according to my needs.

Any tutorial/ reference/ code that can help educate me in this area of coding shall be highly useful.

Many thanks
Posted
Comments
[no name] 25-Mar-14 18:50pm    
Did you happen to try googling for "ASP.NET chat"?
Sergey Alexandrovich Kryukov 25-Mar-14 19:03pm    
This is harder than one can think, in part because what OP wants is not the chart, and also because chart-specific manuals would be too application-oriented.
Anyway, I credited your advice in my answer. Please see.
—SA
Sergey Alexandrovich Kryukov 25-Mar-14 18:51pm    
What you listed cannot be called "chat", mostly due to the item #1.
This is not a question, but a list of some requirements. Imagine someone is answering you. What should this purpose write? A reference to some chat projects or manual? But they will do not what you want, but something else. Write some code to your requirements? You cannot expect that; and, even of someone would like to volunteer, there is no guarantee that you even can accept it; the requirements are not comprehensive.
—SA

1 solution

Please look at first two comments to the question. The comment by InsertCleverUserName suggests what you could do, but by comment should explain to you why you should not look for the "manual" teaching you how to do something which is described by your own requirements. And, more generally, it is very impractical to look for manuals in some application field. Instead, you should look for manuals in general programming and some specific fields of programming. In all cases, it should not be about chats. This approach could be way more productive, because your bigger goal is hardly making one specific chat (again, what you want is not a "chat"), but learn how to develop software and complete software projects.

So, in your case, assuming you know general programming and .NET well, further reading may include:
http://www.asp.net/get-started[^],
http://www.asp.net/mvc[^],
http://www.asp.net/web-pages[^],
http://www.asp.net/entity-framework[^],
http://www.asp.net/identity[^],
http://www.asp.net/signalr[^],
http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/introduction-to-signalr[^].

As to SignalR, you need to start with understanding of its value as a push technology. Please see:
http://en.wikipedia.org/wiki/Push_technology[^],
http://en.wikipedia.org/wiki/Pull_technology[^].

This CodeProject article can be very useful: Asp.Net SignalR Chat Room[^].

—SA
 
Share this answer
 
Comments
Member 10235977 24-Feb-15 8:56am    
Many thanks for you guidance sir.
I have been able to make a website with chat using sql server and gridvew with ajax update.
The only problem is that I have not been able to focus on the last row that is added.
Can you kindly guide me on how to focus on last added row in a gridview. When I add ne message, the new message gets added but I am not able to get focus on that row.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900