title: Chatting and file sharing using C# in Asp.Net Webforms
body: <p>NET Web-forms based application in c#. I need to add a module in the application which allows chatting between logged in users and users can share files during chatting, like Skype. Meanwhile I have to keep a PERMANENT RECORD of each and every word of conversation and files transferred during the session, on my server. I have a bit idea about the implementation of module to achieve the desired result, but I am sure that is not a good practice. Here is my idea:</p>
  
  <p>Chatting:
  While users are chatting, create a data-table which will contain the sender id, receiver id, and message contents. When ever user presses send button or hit Enter, a new row would be inserted in the data-table with both IDs and message contents and then the data-table will be bound to a div etc. to show updated messages to both users. At  the end, on an event (like window close etc) data-table will be converted to the XML and the XML file will be stored permanently either on hard disk or in database.</p>
  
  <p>File-transfer:
  During chatting whenever user press enter/send button we will check the message contents, if the message being sent is a file (with some extension) then upload the file on server and provide a download link to the receiver.</p>
  
  <p>I hope you got my point.</p>
  
  <p>Problem:</p>
  
  <p>1) I want to share files asynchronously i.e. transfer to the receiver and save on the server at the same time. Is it possible?</p>
  
  <p>2) How to tell one user that the other user is typing?</p>
  
  <p>Is there any better way to implement this module? What sort of knowledge should I have to properly comprehend and implement the module?</p>
  
  <p>Thanks for any guidance.</p>