views:

92

answers:

4

I have a website that is already completed in ASP.NET. I need to add a section at the bottom that holds a live streaming video chat (Flash Object), and I need it to persist over different page visits.

e.g. I have profile.aspx and local.aspx that might be visited and I need the little chat frame at the bottom to persist between page changes.

Here's a pic:

alt text

The only ways I can think to do this are...

Make the whole website on page that just dynamically loads what it needs. or use a bottom frame maybe? (not a fan of this idea)

Is there any other way to do this, or a way to easily implement what I need given the fact that I have a whole bunch of aspx's already?

Edit: I forgot to mention, the chat is a streaming video chat. (flash object)

+2  A: 

One possible solution is that you could put both pages as individual iframes under a parent page. The changing frame could then change and navigate to other pages while the chat frame remains constant.

SirDemon
I like this idea almost as much as I hate the idea of frames... This might work. I think I may need some level of communication between the two tho... We'll see if I can monkey around it.
Blankasaurus
+2  A: 

If you need the chat window to truly persist, then you need to avoid page loading. The only ways to do this are with frames or AJAX calls.

I think using a frame is really your best bet here if you don't want to go in and modify your existing pages. If you don't need to communicate between the chat section and the main page, this will be the quickest and easiest way yo get things done.

Another option, which is probably not what you're looking for, would be to cache some of the chat session and reload it when the user changes pages. This way, they retain their chat history, but the chat section disappears during page reloads. Using a Master page or adding a Chat user control to each page would be the best way to get this done.

o6tech
A: 

Do you run on top of a database? Why not put the chat traffic into the database and load it back in when new pages are loaded? If you only want a small amount of text preserved (say the screen space of a small window) you could even use the session state.

Make the persistent area a user control (.ascx file) so you can encapsulate the saving and reloading in one place and easily add it to whichever pages you would like.

Do you use master pages? If so, just put the .ascx in a master page. You may not have to alter your individual pages at all.

To save the chat box text as it is entered you will have to use AJAX. I would use something like JQuery (works great with ASP.NET WebMethods and .asmx) to post the chat box contents back to the server at a set interval.

Justin
Yes, forgot to mention that its a video chat tho. Sorry. =/
Blankasaurus
A: 

Don't actually persist the chat-box at all, persist the chat. Do it like facebook's, where every page gets a new chat-box, and that chat-box obtains the current state of the chat on a regular basis.

If you persist the actually chat-box it won't work, as different tabs will be in different states.

Jon Hanna
Forgot to mention that its a video chat. Sorry. =/
Blankasaurus