Click here to Skip to main content
15,888,113 members
Articles / Web Development / ASP.NET

Ajax Chat Sample via Comet Ajax

Rate me:
Please Sign up or sign in to vote.
4.75/5 (7 votes)
22 Apr 2010GPL33 min read 65.1K   2.3K   53  
An article of how you can create serious web applications via PokeIn Comet Ajax library in minutes
/* 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

 * 
 * PokeIn Library
 * Copyright © 2010 http://pokein.codeplex.com (info@pokein.com)
 * 
 * You must add PokeIn Library as a reference to run this sample
 */
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ChatSample
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public static void Definer(string clientID, ref Dictionary<string, object> list)
        {
            if(ChatApp.Users == null)
            {
                ChatApp.Users = new Dictionary<string,string>();
            }
            if (ChatApp.Names == null)
            {
                ChatApp.Names = new Dictionary<string, string>();
            }
            list.Add("Chat", new ChatApp(clientID));
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior) Pagos
Turkey Turkey
creating an application is a life style. not a job!

Comments and Discussions