<div class="grid--cell fl1 lh-lg">
<div class="grid--cell fl1 lh-lg">
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, <a href="/help/reopen-questions">visit the help center</a>.
</div>
</div>
</div>
<div class="grid--cell mb0 mt8">Closed <span title="2012-01-07 20:16:49Z" class="relativetime">8 years ago</span>.</div>
</div>
</aside>
I am developing online Chat application in asp.net. I am facing a problem like suppose there are two users starts communication. When first user write a message in javascript based chat box Then ajax request goes to server. BUt how I open second user chat box so he responce the first user message?
</div>
When a user sends a message, an AJAX request will be made to your server and you'll probably save the posted message to a database. You can also have an ajax request made every X seconds that checks for any newly posted messages on the server, and if there are any, it shows them to the user.
Alternatively you can use a technology called Comet, through which your server can 'push' a response to the clients to notify them whenever a new message has been posted.
You should research long polling and web sockets. These allow your clients to have updates pushed to them more effectively. You could poll the server every x seconds, but it would be wasteful of resources.
You might want to have a look at SignalR, an async signaling library for .NET which would be perfect for a chat-application:
https://github.com/SignalR/SignalR
Scott Hanselman has a good example on his blog: