chat within asp.net?

  • Thread starter Thread starter OJO
  • Start date Start date
O

OJO

Hello microsoft.public.dotnet.framework.aspnet!

Is this possible to write very simple chat within asp.net (asking google I
got only commercial components' websites)?

BTW:
How can I dynamically add LinkButton to my WebForm?

TIA

--
OJO


"You cannot say, that everybody's happy,
But you can say, that everybody is now
Safe from each other."
King Diamond
 
Sure, I can envision a chat page where multiple clients keep posting back
and the server keeps track of the conversations.
A more efficient solution might be to use a windows forms app and call a web
service to manage the conversations.

Dim myLinkButton As New LinkButton()
myLinkButton.Text = "This is my LinkButton"
Page.Controls.Add(myLinkButton)
 
You could write a html chat app that refreshes on a timer. Store the
messages in the Application object.

Thanks.
Gavin Joyce

--
___________________________________________________________
nTierGen.NET Code Generator - http://www.nTierGen.NET/

Stored Procedures (Get, GetPaged, Insert, Update, Delete)
Data Access Layer - C#
Business Rules Layer - C# & VB.NET
Strongly-Typed DataSets - C#
Web Services - C#
___________________________________________________________
 
U¿ytkownik "Steve C. Orr said:
Sure, I can envision a chat page where multiple clients keep posting back
and the server keeps track of the conversations.
:D

A more efficient solution might be to use a windows forms app and call a
web service to manage the conversations.

Ok, "chat" was only unfortunate pretext. Actually I need another feature. I
have instaled windows service on my machine. I control that service over tcp
using System.Runtime.Remoting. Now what I need. I need my page to show some
informations, got using technique described above. So the page should be
constantly refreshed. I could use some client-side script, but want to
refresh only if data is changed. That's the problem. Anyone could help me?
Dim myLinkButton As New LinkButton()
myLinkButton.Text = "This is my LinkButton"
Page.Controls.Add(myLinkButton)

Yes, I tried it milion times today. Control is added to Page.Controls, but
doesn't appear on the WebForm (Control.Visible=True doesn't make any trick)
:(

--
OJO


"You cannot say, that everybody's happy,
But you can say, that everybody is now
Safe from each other."
King Diamond
 
Two options:
1) Use Smartnavigation. IE will appear to refresh only the parts of the
page that have changed.
Here's more information on that:
http://msdn.microsoft.com/library/d...fsystemwebuipageclasssmartnavigationtopic.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconpage.asp

2) Use web services. Use client side code to manually call back to your
server and then update the necessary parts of the UI yourself via DHTML and
javascript. For this you'll probably need to use the web service behavior.
Here's more information on that:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/webservice/overview.asp

The linkbutton add code should work well from within the Page Init and Page
Load events. If you are trying to add it from other places in the event
model then things get a bit more dicey.
 
Back
Top