using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page { protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) { if (FileUpload1.PostedFile.ContentType =="image/bmp") { FileUpload1.PostedFile.SaveAs(Server.MapPath(".") + "\\uploadfiles\\" + FileUpload1.FileName); Label1.Text = "Upload Successfully...."; } else { Label1.Text = "Upload BMP file...."; } } else Label1.Text = "File Required..."; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)