Note that there are some explanatory texts on larger screens.

plurals
  1. POCan I get away with this or is it just too crude and unpractical?
    text
    copied!<p>I spent the whole of last night searching for a free AspNet web chat control that I could simply drag into my website. Well the search was in vain as I could not find a control that matched my needs i.e List of users, 1 to 1 chat, Ability to kick out users..</p> <p>In the end I decided to create my own control from scractch. Although it works well on my machine Im concerned that It maybe a little crude and unpractical on a shared hosting enviroment.</p> <p>Basically this is what I did :</p> <ol> <li>Created an sql database that stores the chat messages.</li> <li>Wrote the stored procedures and and included a statement that clears old messages</li> </ol> <p>Then the 'crude' part :</p> <ol> <li>Dragged an update panel and timer control on my page</li> <li>Dragged a Repeater databound to the chat messages table inside the update panel</li> <li>Dragged another update panel and inside it put a textbox and a button</li> <li>Configured the timer control to tick every 5 seconds.</li> </ol> <p>..and then I made it all work like this In the timer tick event I 'refreshed' the messages display by invoking Databind() on my repeater i.e</p> <pre><code> protected void Timer1_Tick(object sender, EventArgs e) { MyRepeater.DataBind(); } </code></pre> <p>Then in my send button click event</p> <pre><code> protected void btnSend_Click(object sender, EventArgs e) { MyDataLayer.InsertMessage(Message, Sender, CurrTime); } </code></pre> <p>Well It works well on my machine and Ive got the other functionalities(users list, kick out user..) to work by simply creating more tables. </p> <p>But like I said it seems a little crude to me. so I need a proffesional opinion. Should I run with this or try another Approach ?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload