using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
protected void Button2_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
FileUpload1.SaveAs(Server.MapPath("img/") + FileUpload1.FileName);
Image1.ImageUrl = "img/" + FileUpload1.FileName;
Label1.Text = "uploaded";
}
]