{string fp;fp = fileImgUpload.PostedFile.FileName ;string fn;fn = TextBox1.Text + "_" + TextBox2.Text + "_" + fp.Substring(fp.LastIndexOf("\\") + 1); // TextBox1 and TextBox2 is for image name(if we want to add some image name) string sp;sp = Server.MapPath("photo_contest");if (sp.EndsWith("\\") == false){ sp += "\\";}sp += fn;fileImgUpload.SaveAs(sp);}