Building a simple chatroom
Download the authoritative guide: Data Center Guide: Optimizing Your Data Center Strategy
Download the authoritative guide: Cloud Computing: Using the Cloud for Competitive AdvantagePaul Smullen
Building a simple chat room using ASP is just that - Simple.
Chat rooms make a good example of when to use local, Session and Application level variables.
The chat room in this example uses a frameset with four frames;
A place to put an advertisement banner or a link back to your main site.
This frame shows all messages posted and who posted them.
Login/post message Frame
Before you can post a message you must sign on or log in. This is just an alias that you can be identified as by other users. There is no tracking of user's details carried out.
Application Status Frame
This shows the date and time of the last message posted and a list of people who are currently signed on.
Two Application arrays exists
When a user signs on, they are added to the Users array. The contents of this array are displayed in the Status frame which is refreshed at a set interval.
When the user logs off they are removed from the array.
When the user posts a message it is added to the message array and displayed in the Message frame. Building a simple chat room using ASP is just that - Simple.
See it in action...
This is running here if you want to see how it works.
Download sample code...
Download a ZIP file containing the ASP pages for this applications.
Feel free to contact me by e-mail if you have any queries.
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...