Client Chatting th a server.

G

Guest

I am trying to create a chat application in the browser.
I need to find a way for the client to call back every 15 seconds.
I tried <meta id="meta" http-equiv="refresh" content="15" />
But I am not getting any viewstate with the above trick.
Does anyone have any good ideas?
 
G

Guest

I am trying to create a chat application in the browser.
I need to find a way for the client to call back every 15 seconds.
I tried <meta id="meta" http-equiv="refresh" content="15" />
But I am not getting any viewstate with the above trick.
Does anyone have any good ideas?

Hi Arne,

When you refresh a page, you are calling the page via GET, not a POST.
This is the reason that you get no viewstate. To do it you have to
change meta refresh to a JavaScript that would submit the form every
15 seconds.

Where do you need to have the viewstate? I think in a chat you need to
get new messages only, so you don't need to post anything every 15
seconds.

Hope this helps
 
G

Guest

Steve,
The webchat example is just wonderful. I guess I should show my appreciation
by buying a copy of your book.
Now I have another requirement.
The clients should not talk to each other but to a customer service rep. I
was thinking the rep should have a winform. The webclient should keep in
contact with the winform with WCF.
Any more good ideas?

--
Arne Garvander
Certified Geek
Professional Data Dude


Steve C. Orr [MCSD said:
The JavaScript setTimeout method is commonly used for such matters.

Here's more info:
http://www.w3schools.com/js/js_timing.asp
http://SteveOrr.net/articles/WebChat.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

Webchat could be modified to do such a thing.
Since it uses AJAX calls back to a web service, a winform front end should
be able to call the same web service theoretically. Then you can have two
front ends.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


Arne said:
Steve,
The webchat example is just wonderful. I guess I should show my
appreciation
by buying a copy of your book.
Now I have another requirement.
The clients should not talk to each other but to a customer service rep. I
was thinking the rep should have a winform. The webclient should keep in
contact with the winform with WCF.
Any more good ideas?

--
Arne Garvander
Certified Geek
Professional Data Dude


Steve C. Orr [MCSD said:
The JavaScript setTimeout method is commonly used for such matters.

Here's more info:
http://www.w3schools.com/js/js_timing.asp
http://SteveOrr.net/articles/WebChat.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net



Arne said:
I am trying to create a chat application in the browser.
I need to find a way for the client to call back every 15 seconds.
I tried <meta id="meta" http-equiv="refresh" content="15" />
But I am not getting any viewstate with the above trick.
Does anyone have any good ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top