Building an AJAX Based Web Chatting Application using ASP.NET 2.0
page 4 of 6
by Xianzhong Zhu
Feedback
Average Rating: 
Views (Total / Last 10 Days): 131390/ 217

Detailing the solution

Before starting to put AjaxPro.NET into action, let me give you a brief introduction.

AjaxPro.NET is a well-known open source framework, which is based on the server-side techniques and provides support for constructing different versions of .NET Web applications. The framework supports the server-side .NET SDK by a few means via the client-side JavaScript. It can direct the JavaScript requests to the related server-side .NET methods and then the server returns the newly-generated special JavaScript to the browser. Its main functions are listed as below:

·         Access the Session and Application data from the client-side JavaScript

·         Cache the required results

·         Freely use source code

·         Add and modify new methods and properties in the framework without modifying any source code

·         All the classes support the client-side JavaScript to return data, and DataSet can be used from inside the JavaScript

·         Use the HTML controls to access and return data

·         Do not need reload the pages and use the event delegate to access data 

·         Supply only one method for call and dramatically decrease the CPU usage

Now, to use AjaxPro.NET in our ASP.NET 2.0 web applications we should properly configure the web.config file. Since the downloaded materials have been shipped with a guide and an excellent Visual Studio Add-in—AjaxProVSTemplate.vsi, we will not talk much about the usage of this framework, but focus on the main topic.

In this demo application we mainly provide three web pages—login.aspx, main.aspx, and chatroom.aspx. There is, however, a small trick worthy to be mentioned first.

Index.html—a broker

To hide the browser's menu bar and toolbars in our chatting pages, we use some tricks -building a temporary broker page index.html. The client-side JavaScript in Listing 1 below shows the how-to.

Listing 1:

<body>  
<script language = "javascript">
//open a new window
window.open("Login.aspx", "_blank",
  "location=no;menubar=no;status=no;toolbar=no");
//close the parent window
Close();
// close the window without any prompt
function Close()
{
  var ua = navigator.userAgent;
  var ie = navigator.appName == "Microsoft Internet Explorer" ? true : false;
  if (ie)
  {
    var IEversion = parseFloat(ua.substring(ua.indexOf("MSIE ") + 5, ua.indexOf
      (";", ua.indexOf("MSIE "))))if (IEversion < 5.5)
    {
      var str = '<object id=noTipClose classid=
        "clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">';
      str += '<param name="Command" value="Close"></object>';
      document.body.insertAdjacentHTML("beforeEnd", str);
      document.all.noTipClose.Click();
    }
    else
    {
      window.opener = null;
      window.close();
    }
  }
  else
  {
    window.close()
  }
}
 
</script>  
</body>

Login.aspx

Next, comes up the normal login page, login.aspx, and Figure 3 shows you the first impress.

Figure 3

This web page is the entry point of this web-versioned application, which merely calls the stored procedure UserLogin described before so as to accomplish logging into the system. This procedure is a typical one and we will not depict it, but only one thing should be noted: If the user name entered is not empty and there is not an old one inside the database, then we will simply store it whether its relevant password is empty or not. For more details about this please check out the stored procedure's SQL scripts. So next, we will move to the key code in the file login.aspx.cx.

Listing 2: The typical ASP.NET 2.0 server-side database connection programming for the login page

public partial class login: System.Web.UI.Page
{
  private string myConnectionString = ConfigurationManager.ConnectionStrings[
    "msn_Data_ConnStr"].ConnectionString;
  protected System.Data.SqlClient.SqlConnection sqlConnection;
  protected System.Data.SqlClient.SqlCommand sqlCommand;
  protected void Page_Load(object sender, EventArgs e){}
 
  protected override void OnInit(EventArgs e)
  {
    InitializeComponent();
    base.OnInit(e);
  }
  private void InitializeComponent()
  {
    this.sqlConnection = new SqlConnection(myConnectionString);
    this.sqlCommand = new System.Data.SqlClient.SqlCommand();
    this.sqlCommand.CommandText = "dbo.[UserLogin]";
    this.sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;
    this.sqlCommand.Connection = this.sqlConnection;
 
    //specify the parameters of the stored procedure
    this.sqlCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter(
      "@RETURN_VALUE", System.Data.SqlDbType.Int, 4,
      System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(0)), (
      (System.Byte)(0)), "", System.Data.DataRowVersion.Current, null));
 
    this.sqlCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter(
      "@username", System.Data.SqlDbType.VarChar, 50));
    this.sqlCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter(
      "@password", System.Data.SqlDbType.VarChar, 50));
    this.sqlCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter(
      "@status", System.Data.SqlDbType.Int, 4));
  }
 
  protected void btnLogin_Click(object sender, EventArgs e)
  {
    int iRet =  - 1;
    sqlCommand.Parameters["@username"].Value = tbUsername.Text;
    sqlCommand.Parameters["@password"].Value = tbPassword.Text;
    sqlCommand.Parameters["@status"].Value = Convert.ToInt32
      (ddlStatus.SelectedValue);
 
    try
    {
      sqlConnection.Open();
      sqlCommand.ExecuteNonQuery();
      iRet = Convert.ToInt32(sqlCommand.Parameters["@RETURN_VALUE"].Value);
    }
    catch (SqlException)
    {
      Response.Write("<script>alert('Here,in SqlException');</script>");
        //merely for debugging purpose
    }
    finally
    {
      sqlConnection.Close();
    }
    if (iRet == 0)
    {
      FormsAuthentication.RedirectFromLoginPage(tbUsername.Text, false);
      Response.Redirect("Main.aspx");
    }
    if (iRet == 2)
    {
      FormsAuthentication.RedirectFromLoginPage(tbUsername.Text, false);
      Response.Redirect("Main.aspx");
    }
    else
    {
      lblMessage.Text = "iRet =" + iRet.ToString() +
        "The login failed, please check out your password!";
    }
  }
}

Main.aspx—the headquarters

Now, let us pay attention to the main controlling page of the chatting system, main.aspx, whose run-time snapshot is shown in Figure 4.

Figure 4

From the developer's point view, we can divide this part into three different components: login status switching, the users list viewing, and the newest message hinting. So, let us dig into their inner workings one by one.

Switching between the login states

At the top of the main page lie the current user name and its login status. It is easy for the user to switch between items Online and Offline via the ListBox control. When the user click the Logout button, the user will log off and the control is switched to the initial login page. Now, let us examine the related inner logic. First, we define an Ajax method—SetUserStatus on the server side, which directly updates the user login status in table users according to the passed arguments—strUsername and iStatus. Listing 3 gives the corresponding coding:

Listing 3

[AjaxPro.AjaxMethod]
public  int SetUserStatus(string strUsername, int iStatus) {
      //hold the returned value
      int iRet = 0;
      //Obtain the database connection string from the file web.config and set up the connection
      string strConnection = ConfigurationManager.ConnectionStrings["msn_Data_ConnStr"].ConnectionString;
      SqlConnection conn = new SqlConnection(strConnection);
 
      //create a new SQLCommand object
      SqlCommand cmd = conn.CreateCommand();
      cmd.CommandText = string.Format(
            "UPDATE users SET status = {0} WHERE username='{1}'",
            iStatus, strUsername
            );
      try{
            //open the data connection
            conn.Open();
            //execute the SQL command-- set the user's status
            iRet = cmd.ExecuteNonQuery();
      }
      catch (SqlException){}
      finally
      {
            //close the database connection
            conn.Close();
      }
      return iRet;
}

Next comes up the relevant client-side function, setUserStatus, which will call the server-side method setUserStatus to update the current user login status, as is shown in Listing 4.

Listing 4: The client-side JavaScript method calls the server-side Ajax one

function setUserStatus()
{
      //user name
      var username = el("lblUsername").innerText;
      //status
      var status = el("user_status").value;
      //call the relevant server-side Ajax method
      AjaxProChat.SetUserStatus(username, status);
}

As for logoff, this is performed inside the button Logout-related event handler, lblExit_Click, via the routine ASP.NET event response mechanism. Here we leave out the code listing.

Viewing the user list

Note that, in this case, we take the action of inquiring the database on time to list all the on-line users stuff. Therefore, we have to earnestly count the cost between the user real-time characteristics and the server-side load. Obviously, if the interval for inquiring the database is shorter, then the real-time features of the application will be acceptable, which will put a heavier burden on the server's shoulder. However, if the interval is longer, then there is a lighter load on the server and the merciful real-time characteristics on the client side. So, here we use some sleight: in the database we add a sign—the field UsersChanged in the table global_info which is used to record the times table users to be changed. So, in the code we can judge on time whether the sign has been changed to decide whether to send requests to the server side for updating the on-line users list or not. Here, for brevity, we select to omit the simple server-side code while making room for the client-side programming.

Listing 5

//update the users list
function refreshUserlist()
{
  //get the value of field UsersChanged from inside table users on the server side
  var changed = AjaxProChat.StatusChanged().value;
  //if table users has changed
  if (changed > changedTimes)
  {
    //write down the current value of field UsersChanged
    changedTimes = changed;
    //obtain the DataTable object to hold the users info
    var arUserlist = AjaxProChat.GetOnlineUserList().value.Tables[0];
    //the <div> object to show the users list
    var divUserlist = el("userlist");
    //remove the old contents
    while (divUserlist.childNodes.length > 0)
    {
      divUserlist.removeChild(divUserlist.childNodes[0]);
    }
    //show the users list
    for (var i = 0; i < arUserlist.Rows.length; i++)
    {
      //the login user name
      var username = arUserlist.Rows[i].username;
      //nickname
      var nickname = arUserlist.Rows[i].nickname;
      //create a <div> object for showing one user message
      var result = document.createElement("div");
      //set the cursor shape hand-like
      result.style.cursor = "pointer";
      //inner patches
      result.style.padding = "2px 0px 2px 0px";
      //mouse click handler--open the chat room window
      result.onclick = function()
      {
        //if the chat room window has not been opened
        if (!sendWindow)
        {
          // open the chat room window--note the passed parameters
          window.showModelessDialog("chatroom.aspx?username=" + username,
            window, "help:no;unadorned:yes;edge:sunken;resizable:yes;status:no")
            ;
        }
      };
 
      //the texts for the user name and the nickname are to be shown inside the <span> object
      var result1 = document.createElement("span");
      //set the mouse in-and-out effect
      result1.onmouseover = function()
      {
        this.style.color = "#205288";
      };
      result1.onmouseout = function()
      {
        this.style.color = "#000000";
      };
      //set show style
      result1.style.textAlign = "left";
      result1.style.fontWeight = "bold";
      result1.style.fontFamily = "Arial, Verdana";
      //show the user name plus the nickname
      result1.innerHTML = username + " (" + nickname + ")";
      //attach the <div> object to DOM
      result.appendChild(result1);
      divUserlist.appendChild(result);
    }
  }
}

Since we have added so many comments on the import line, we only sum up the general process: obtain the most recent users list inside the database via the Ajax method—AjaxProChat.GetOnlineUserList(); fill in the user name and related nickname in turn. As is seen from above, we use much subtle JavaScript programming around the DOM object—div and span.

A MSN-like popping up window

To conveniently accept the new messages, we have designed a small and friendly MSN-like hint window.

Figure 5: The run-time screenshot of the MSN-like hint window

Page main.aspx is responsible for checking on time whether there have been new messages coming in; if so, this small hint window is to be popped up and the current user can click the link in it to reply. As with the functions of the main page, there are also two steps—both the server side and the client side—needed to accomplish such a prompt action. First, we have defined an Ajax method, mainGetNewMessage, who serves to obtain a DataSet of the newest chatting messages. We can see the typical database connection in ASP.NET 2.0 from Listing 6.

Listing 6: Code for the server-side method mainGetNewMessage

[AjaxPro.AjaxMethod]
public DataSet mainGetNewMessage()
{
  DataSet ds = new DataSet();
  SqlConnection conn = new SqlConnection
    (ConfigurationManager.ConnectionStrings["msn_Data_ConnStr"].ConnectionString);
  SqlCommand cmd = conn.CreateCommand();
  cmd.CommandText = string.Format("GetNewMessage '{0}'", User.Identity.Name);
  SqlDataAdapter da = new SqlDataAdapter(cmd);
  try
  {
    da.Fill(ds);
  }
  catch (SqlException){}
  finally
  {
    conn.Close();
  }
  return ds;
}

Since the code above is the common database operation and is provided with so many notations, we will not give unnecessary details any more.

On the client side, there is accordingly defined a method, checkNewMessage, who is to invoke the server-side method, mainGetNewMessage, and will pop up a hint box whenever there comes a new message. Listing 7 shows the related code snippet.

Listing 7: Code for the client-side method checkNewMessage

function checkNewMessage()
{
  if (!sendWindow)
  {
    var dt = AjaxProChat.mainGetNewMessage().value.Tables[0];
    if (dt.Rows.length > 0)
    {
      var sender = dt.Rows[0].sender;
      var content = DealBrackets(dt.Rows[0].content);
      var MSG1 = new CLASS_MSN_MESSAGE("aa", 200, 120, "Hint:", sender +
        " says: ", content);
      MSG1.oncommand = function()
      {
        if (!sendWindow)
        {
          window.showModelessDialog("chatroom.aspx?username=" + sender, window,
            "help:no;unadorned:yes;edge:sunken;status:no");
        }
      };
      MSG1.rect(nullnullnull, screen.height - 50);
      MSG1.speed = 10;
      MSG1.step = 5;
      MSG1.show();
    }
  }
}

Here shows the typical flow of calling an Ajax method on the server side from within JavaScript on the client side. As you may have guessed, the true secret for this hint window lies in the following code snippet.

Listing 8

var MSG1 = new CLASS_MSN_MESSAGE("aa",200,120,"Hint:",sender + " says: ",content);

Inside the downloadable source code, we define a pop up window class in JavaScript in the file CLASS_MSN_MESSAGE.js.  We are creating an instance of the class CLASS_MSN_MESSAGE and the last line above show the pop up window by calling the show method of the instance. For more details please do research into the relevant JavaScript coding.

Chatroom.aspx

Lastly, we come to the meat and potatoes of this Ajax-based chatting application. The really important window to start chatting is page chatroom.aspx. Let us first look at its run-time screenshot in Figure 6.

Figure 6

As is seen from Figure 6, it is rather simple. Most of the page is for chatting with friends and the corresponding messages, with a TEXTBOX control for entering the message to send and a basic Send button at the bottom line. You may have already guessed the similar JavaScript programming skill is used for arranging the <div> object and its inner sub items.

For easier comprehension, we have also divided the part into three components: examining the recent messages, sending the messages, and receiving the messages. Again, let us analyze them one after the other.

Examining the recent messages

When the chat room window is loaded, there is a specified number of latest chatting messages to be loaded. For this purpose, an AJAX method—GetRecentMsg is defined on the server side which then invokes the stored procedure GetRecentMsg and finally the required items of chat records return. Listing 9 gives the specific coding of method GetRecentMsg.

Listing 9

[AjaxPro.AjaxMethod]
public DataSet GetRecentMsg(string strUsername)
{
  DataSet ds = new DataSet();
  SqlConnection conn = new SqlConnection
    (ConfigurationManager.ConnectionStrings["msn_Data_ConnStr"].ConnectionString);
  SqlCommand cmd = conn.CreateCommand();
  cmd.CommandText = string.Format("GetRecentMsg '{0}','{1}', {2}",
    User.Identity.Name, strUsername, 8);
  SqlDataAdapter da = new SqlDataAdapter(cmd);
 
  try
  {
    da.Fill(ds);
  }
  catch (SqlException){}
  finally
  {
    conn.Close();
  }
  return ds;
}

Sending the messages

For this purpose, an AJAX method—SendMessage is defined on the server side which then invokes the stored procedure GetRecentMsg and finally the required items of chat records return. Listing 10 gives the specific coding of method GetRecentMsg.

Listing 10

[AjaxPro.AjaxMethod]
public DataSet GetRecentMsg(string strUsername)
{
  DataSet ds = new DataSet();
  SqlConnection conn = new SqlConnection
    (ConfigurationManager.ConnectionStrings["msn_Data_ConnStr"].ConnectionString);
  SqlCommand cmd = conn.CreateCommand();
  cmd.CommandText = string.Format("GetRecentMsg '{0}','{1}', {2}",
    User.Identity.Name, strUsername, 8);
  SqlDataAdapter da = new SqlDataAdapter(cmd);
  try
  {
    da.Fill(ds);
  }
  catch (SqlException){}
  finally
  {
    conn.Close();
  }
  return ds;
}

Receiving the messages

Here, certainly should we receive the messages in real time, while the whole process is very much similar to that of the main page, so we do not say more than is needed. But there is still one thing to be noticed, if the chat room window has been open, the new message will be shown directly in it; otherwise there will pop up a small hinting window (see Figure 5) for this new message. This is why the global variable sendWindow is defined inside page main.aspx's client-side JavaScript, as is shown below.

Listing 11: The initial definition of the variable sendWindow

//……(omitted, inside main.aspx)
<script language="javascript">
//used to mark whether the chat room is open
var sendWindow = false;
//check out whether the user status has been changed
var changedTimes = 0;
//the main procedure
mainLoop();
//……

Although variable sendWindow is defined inside page main.aspx for identifying whether chat room has been already open, it is also used inside page chatroom.aspx. In connection with the definition above, in page chatroom.aspx there exist the following code snippets.

Listing 12: Variable sendWindow is also used in page chatroom.aspx

//……(omitted, inside page <span class=Italic>chatroom.aspx</span>)
<body onunload="dialogArguments.sendWindow=false;" onload="dialogArguments.sendWindow=true;">
//……

When page chatroom.aspx is opened for the first time, variable sendWindow is set to true, when function checkNewMessage in page main.aspx will not query new messages and the message be displayed directly in the chat room. However, when the web page chatroom.aspx is close, variable sendWindow is set to false, when function checkNewMessage in page main.aspx will invoke the relevant method GetNewMessage in the server side which will inquire new messages via the stored procedure GetNewMessage and finally show the result in the pop up hinting box.

Author's Notes: until now, we have introduced all the web pages and their rough functions in this sample. Due to the strict demands of SQL Server 2005 Express Edition (and of course including SQL Server 2005), I suggest you download and decompress the source code and then configure the database engine with great care. As for the AjaxPro.NET framework, maybe you are a newbie to it, but there is surely noy much difficulty for you in grasping its general usage. Only one thing is to be noticed—I use the latest version of AjaxPro.NET framework in this sample, but it will be ok to follow me with the related schema. Last but not the least, I have tested the demo project under hosted mode as well as under web mode using Microsoft IE. That is all!


View Entire Article

User Comments

Title: Chat Application   
Name: Vipin
Date: 2013-01-22 11:45:09 AM
Comment:
Article was good.

I have create an application based on this tutorial..

Chat with me on below link to know my experience on this,
http://www.discuzznow.com/member/1/myim/vipin-vijayan
Title: hi   
Name: prabhu
Date: 2013-01-22 6:18:37 AM
Comment:
hi i had read your article its gud .can please send me the database and stored procedure plz...
prabhusiva19@gmai.com
Title: yy   
Name: yy
Date: 2012-10-16 5:05:10 AM
Comment:
yyyyy
Title: 11   
Name: 22
Date: 2012-09-15 3:31:19 AM
Comment:
33333
Title: chat Application   
Name: Sonal Shinde
Date: 2012-06-09 2:30:15 AM
Comment:
U r application such nice, but i read feedback. so many errors in this application. i also use & got this error,How does the person move from the main page to the chat page? & when user login then on main page not display user name there display sever name. so u have solutions then plz send me. Its really urgent
MY EMAIL ID: sonalshinde2009@gmail.com
Title: dszc   
Name: zsdc
Date: 2012-05-22 3:27:11 AM
Comment:
xzczc
Title: 2012 NFL jerseys   
Name: NIKE NFL jerseys
Date: 2012-05-20 11:39:53 PM
Comment:
[/pre]Cheap NFL,NBA,MLB,NHL
[url=http://www.jersey2shop.com/]Jerseys From China[/url]
[url=http://www.jersey2shop.com/]2012 nike nfl Jerseys[/url]
[url=http://www.jersey2shop.com/]cheap China Jerseys[/url]
[url=http://www.jersey2shop.com/]Sports Jerseys China[/url]
[url=http://www.jersey2shop.com/NFL-Jerseys-c68/]NFL Jerseys China[/url]
[url=http://www.jersey2shop.com/NBA-Jerseys-c77/]NBA Jerseys China[/url]
NHL Jerseys China
[url=http://www.jersey2shop.com/MLB-Jerseys-c94/]MLB Jerseys China[/url]NFL jerseys For Sale online.All Our Jerseys Are Sewn On and Directly From Chinese Jerseys Factory
[/pre]
[pre]We Are Professional China jerseys Wholesaler
[url=http://www.cheapjersey2store.com/]Wholesale cheap jerseys[/url]Cheap mlb jerseys
[url= http://www.cheapjersey2store.com/]2012 mlb all atar jerseys[/url]
[url= http://www.cheapjersey2store.com/ [/url]Cheap China Wholesael[/url]
[url= http://www.cheapjersey2store.com/]Wholesale jerseys From China[/url]
[url=http://www.cheapjersey2store.com/]2012 nike nfl Jerseys[/url]Free Shipping,Cheap Price,7 Days Deliver
[/pre]
[/pre]
We are professional jerseys manufacturer from china,wholesal
sports [url= http://www.cheapjersey2store.com/]Jerseys From China[/url]
[url=http://www.cheapjersey2store.com/NFL-Jerseys-c68]NFL jerseys China[/url]
[url=http://www.cheapjersey2store.com/NHL-Jerseys-c96/]NHL Jerseys China[/url]
[url=http://www.cheapjersey2store.com/NBA-Jerseys-c77/]NBA Jerseys China[/url]
[url=http://www.cheapjersey2store.com/MLB-Jerseys-c94/]MLB Jerseys China[/url]
[url= http://www.cheapjersey2store.com/]China Jerseys[/url],Free Shipping
[/pre]
[/pre]
We are professional jerseys manufacturer from china,wholesal
sports [url= http://www.jerseycaptain.com/]cheap jerseys sale online [/url]
[url= http://www.jerseycaptain.com/]2012 nike nfl Jerseys[/url]
[url=http://www.jerseycaptain.com/NFL-Jerseys-c68]cheap NFL jerseys China[/url]
[url=http://www.jerseycaptain.com/NHL-Jerseys-c96/]NHL Jerseys C
Title: fgff   
Name: tfg
Date: 2012-05-16 1:52:52 AM
Comment:
jhgj
Title: Want Database backup and store procedure   
Name: Danish Patel
Date: 2012-05-01 5:28:06 AM
Comment:
hi can u please send me database backup and store procedure for it
id:- happy1.happy1@yahoo.com
Title: ty   
Name: tyu
Date: 2012-04-26 3:39:41 AM
Comment:
u
Title: Unable to type messege   
Name: minu
Date: 2011-08-15 4:13:25 AM
Comment:
thanks for this Article,but when user login then their is no box for typing msg,can u help me plz........................................... its urgent
Title: Chat   
Name: sanjeev
Date: 2011-05-12 9:32:05 AM
Comment:
Please can u send me the DataBase or storedprocedure which u have used in the above ChatApplication.

Email id : sanjeevzeromax@gmail.com

Thanks
Title: Unable to judge   
Name: Your's Friend
Date: 2010-12-01 10:59:11 PM
Comment:
Please can u send me the DataBase or storedprocedure which u have used in the above ChatApplication so that i can test in my system and i vl give u the feed back as soon as possible

Email Id: aryan.mvsr@gmail.com

Thanking you
Aryan
Title: Dangi   
Name: kuldeep Dangi
Date: 2010-10-26 2:42:43 AM
Comment:
can u pls send me database on Dangi.kuldeep@yahoo.com
thx
Title: Hi   
Name: Test
Date: 2010-10-08 1:48:51 PM
Comment:
Thank You.
Title: chat   
Name: bini
Date: 2010-09-13 4:47:40 AM
Comment:
pls send the code for voice chat in asp.net 2.0 web application
bini.babym@gmail.com
Title: good   
Name: kedar
Date: 2010-06-02 2:43:07 AM
Comment:
Hi it's good.. can you send me database on kedargp@yahoo.co.in
Title: very good   
Name: Ashish Kaushik
Date: 2010-04-08 10:06:18 AM
Comment:
Very good i need it
Title: Great   
Name: Rahul
Date: 2010-03-11 2:14:55 AM
Comment:
its really great work
Title: good   
Name: rohit
Date: 2010-02-20 10:54:37 PM
Comment:
hi your article is very good
Title: DataBase Backup   
Name: rams
Date: 2010-02-15 3:29:45 AM
Comment:
hi ,i need u r help ..can u send me the databasebase backup..
my mail id boyiniramana@gmail.com
Title: multichat is not working   
Name: nitin
Date: 2010-02-09 6:18:27 AM
Comment:
hi Xianzhong Zhu, yar mutilchat is not workng. plz upload latest code for multichat ok...............
Title: MultiChat is not working   
Name: Karthikeyan.G
Date: 2009-12-14 2:53:58 AM
Comment:
Hi,
When i try to open chat window, only with last user i can chat,even though i select 1st person from the list and also when i click on 2nd person its opening the window with same query...... please can u provide solution for this....
Title: good   
Name: Raghavendra
Date: 2009-11-11 1:00:22 AM
Comment:
good article
Title: Data should show directly   
Name: Gaurav Gupta
Date: 2009-09-09 7:54:33 AM
Comment:
Your article is very very good
i am facing one problem in this i want to show the message directly at chatroom.aspx page .how i can solve this prob.i am missing some think plz tell me .

My mail id guptagaurav212@gmail.com

Thanks Gaurav
Title: DatabaseBak   
Name: Mohan
Date: 2009-08-31 12:26:38 PM
Comment:
plz help any one how to restore this file AjaxChatDB.bak am using sql2005, there getting error, any can send me ajaxchatdb.mdf, thats useful to me


thanks in advance
dotnetmohan@gmail.com
Title: i cant chat many user   
Name: Bharani
Date: 2009-05-19 7:23:05 AM
Comment:
hi,
i am logined three users,then main page display three online members,i can chat only one person,suppose i am seleted anther person means the query string name is same for all users,wht,how can i solve this prblems,

can u help me
rambharani@gmail.com
Title: Only 7 Message Display the ChatRoom   
Name: Bharani
Date: 2009-05-15 8:55:03 AM
Comment:
hi,
hi i am chatting but only 7 message display the chatroom,after the 7 message doesn't display,
cani i help u..
Title: Not in chat   
Name: siva
Date: 2009-04-30 6:08:43 AM
Comment:
hi,
i was dowmload your ajaxprochat and also database i m downloaded then it will open microsoft visual studio2005 after that i was run the program just i was logined ajax and mary.I was dispalyed online members list but i am selected mary then suddently open the chatroom i write message after that i was click send then finally didnt send message one user to another user

what problem tellme plz
Title: About the database   
Name: Xianzhong
Date: 2009-04-29 11:18:01 AM
Comment:
Hi all,
just open sub-folder 'DatabaseBak', under which there is a file named 'AjaxChatDB.bak'. That's it (you have first to open SQL Server Management Studio and use the 'restore' menu item to restore the 'ajaxchatdb.mdf'). Hope this helps.
Title: send me your DataBase Backup   
Name: BharaniR
Date: 2009-04-29 10:27:32 AM
Comment:
can i send your database backup please,
by
rambharani@gmail.com
bharanisoft@yahoo.co.in
Title: send me your DataBase BackUP   
Name: bharanir
Date: 2009-04-28 7:45:16 AM
Comment:
please can i send your database backeup

please help me
rambharani@gmail.com
Title: Downloading the database problem   
Name: Bharani
Date: 2009-04-28 2:02:43 AM
Comment:
there is a problem in downloading the database backup file.
How to use in your DatabaseBak.
here in this we should not find any .mdf file which u mentioned in the download file.
please help me
rambharani@gmail.com
Title: hi   
Name: bharanir
Date: 2009-04-28 2:00:07 AM
Comment:
hi i want all query
Title: message transfer   
Name: Ashim
Date: 2009-03-31 11:07:15 AM
Comment:
I setup the project successfully. i login as ajax/ajax but when i type my message, it does not seem to transfer the message becuse i can't see the message in upper white area. any idea what what might be missing?
Title: Doubt about chat   
Name: SimiAbhilash
Date: 2008-11-18 7:15:07 AM
Comment:
hi,
First of all thnk u for giving us such a chat application.
I have one problem with this.If multiple users are online when i send message to the first one the message goes to the last user every time.How to fix this problem

Please help me
by
simi
simiabhilash@yahoo.co.in
Title: Comment and question   
Name: stuart
Date: 2008-11-13 3:23:54 AM
Comment:
Thanks so much for this article.Its really done a lot to help us get something in regard to chat applications.My question though is; how do i implement these stored procedures? How does the person move from the main page to the chat page?Thanx
Title: About the database accompanying this article   
Name: Author
Date: 2008-11-10 6:55:01 AM
Comment:
Dear readers,
To use the attached database-ajaxchatdb, you have first to open SQL Server Management Studio and use the 'restore' menu item to restore the ajaxchatdb.mdf. Next, you will start to debug the sample web application.
Happy programming!
Title: there is a problem in downloading the database   
Name: Bhanu
Date: 2008-11-10 5:20:51 AM
Comment:
there is a problem in downloading the database backup file.

here in this we should not find any .mdf file which u mentioned in the download file.
Title: Building an AJAX Based Web Chatting Application using ASP.NET 2.0   
Name: T.MAyilrajan
Date: 2008-10-18 8:45:45 AM
Comment:
Hi,
You have done a great job.It is more useful.But this source code does not display the online users.But it does not show any error.Can help me to fix this problem.
Title: project Leader   
Name: N Srinivasachowdary
Date: 2008-09-23 6:59:00 AM
Comment:
i saw u r aritical. It is good. i am also develop the live chat application.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2018 ASPAlliance.com  |  Page Processed at 2018-10-21 6:22:26 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search