Creation of 'Chat Box' in C#
using
System;
using
System.Collections.Generic;
using
System.Linq;
// you have to
add these namespaces for creation and for web control
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
public
partial class
Default3 : System.Web.UI.Page
{
protected void Page_Load(object
sender, EventArgs e)
{
// its on you
}
protected void Button1_Click(object
sender, EventArgs e)
{
Window1.Visible =
true;
}
private string Chat
{
get
{
if (Application["a"]
== null)
Application["a"]
= "";
return Application["a"].ToString();
}
set
{
Application["a"]
= value;
}
}
protected void Timer1_Tick(object
sender, EventArgs e)
{
Label1.Text = Chat;
}
protected void Button2_Click(object
sender, EventArgs e)
{
Chat = TextBox1.Text
+ "<br/>" + Chat;
}
}