protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "You have clicked the button";
TextBox4.Text = "This is a multi line textbox. This is a multi line textbox. This is a multi line textbox. This is a multi line textbox. ";

TextBox3.Text = TextBox2.Text;
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
TextBox1.Text = "The Text is changed.";

}


protected void Button1_Click(object sender, EventArgs e)
{
Literal1.Text = "Welcome to ASP.NET 2.0";
}
Html Code is:

asp:HiddenField ID="HiddenField1" runat="Server" Value="Welcome to ASP.NET 2.0"
Visible="False" 

Source Code is:


protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = HiddenField1.Value;
}
Source Code:

protected void Button1_Click(object sender, EventArgs e)
{
if( FileUpload1.HasFile)
{

FileUpload1.SaveAs("C:/projects/" + FileUpload1.FileName);
Label2.Text = "File Uploaded";
}
else
Label2.Text = "No uploaded file";

}
out put:
Html code:

stem.Data.SqlClient;

public partial class Default2 : System.Web.UI.Page
{
SqlConnection scn = new SqlConnection("Data Source=.;Initial Catalog=test;Integrated Security=True;Pooling=False");
protected void Page_Load(object sender, EventArgs e)
{
GridView1.DataSource = GetData();
GridView1.DataBind();

}
ArrayList count = new ArrayList();
ArrayList rate = new ArrayList();
ArrayList date = new ArrayList();
int ln,a,b;
public DataSet GetData()
{
scn.Open();
SqlCommand cmd = new SqlCommand("select * from purchase",scn);
SqlDataReader sdr = cmd.ExecuteReader();
while (sdr.Read())
{
count.Add(sdr["count"].ToString());
rate.Add(sdr["rate"].ToString());
date.Add(sdr["date"].ToString());
}
sdr.Close();
scn.Close();
ln =Convert.ToInt32(count.Count.ToString());
DataSet ds = new DataSet();
DataTable dt = new DataTable("Purchase");
DataRow dr;
dt.Columns.Add(new DataColumn("Id", typeof(Int32)));
dt.Columns.Add(new DataColumn("Date", typeof(string)));
dt.Columns.Add(new DataColumn("Price", typeof(Int32)));
for (int i = 0; i <= ln-1; i++)
{
dr = dt.NewRow();
dr[0] = i;
dr[1] = date[i].ToString();
a =Convert.ToInt32(count[i].ToString());
b = Convert.ToInt32(rate[i].ToString());

dr[2] =a*b;
dt.Rows.Add(dr);
}
ds.Tables.Add(dt);
Session["dt"] = dt;
return ds;
}

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{

if (e.Row.RowType == DataControlRowType.DataRow)
{
DataBinder.Eval(e.Row.DataItem, "Price").ToString(); 
}


}
}