English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have found quite a number of chat program samples but the problem is that when i dwnload the sample code, i can't really view the code and designs at the same time making it hard to understand how it is done...does anyone here know how to code a simple multi chat program using asp.net?? care to help me?? please

2006-08-01 17:41:23 · 2 answers · asked by braich_gal 3 in Computers & Internet Programming & Design

i prefer one using vbscript in asp.net

2006-08-01 19:06:20 · update #1

2 answers

Chat programs are one of the easiest .. so don't worry! You can store your chat inside a database or a plain text file. I assume that yours is a web-based application. So just split the page up into 2 frames, one frame displaying the contents of the database or the text file, while the other is a form that stores the typed sentence inside the database or text file. A more complex one can be created with the help of AJAX (Asynchronous Javascript And XML). If you need more detailed help, drop me an email.

2006-08-01 18:22:20 · answer #1 · answered by bryanchen 2 · 1 1

Quite some time back, I had used the following technique for simulating chat on ASP:
1. Create application level variables to hold current chat lines (from 10 to 15 or 20 - depending on how many lines you want to show)
2. When a user logs in, in Session_Start events, add his entry into the last line variable. Before this, you need to move lines up - i.e. line 2 to line 1, line 3 to line 2, line 4 to line 3 etc. This can be done easily in a loop.
3. Design a page with two frames: top frame showing chat content, second frame showing a text box with submit button.
4. When user clicks on submit at second frame, on server script, take the submitted text, add it to the last line variable along with user name. Move all previous lines one up - as described above.
5. When user exits, use Session_End event to announce his departure in similar way.

Hope this helps. I am sorry - I could not provide code. Its quite long time (more than 4 years) since I have used the above logic and doesnt have that code now.

Good luck.

2006-08-01 17:50:21 · answer #2 · answered by Indian_Male 4 · 0 0

fedest.com, questions and answers