We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
Sumit Kesarwani
21-Aug-2014protected void button1_Click(object sender, EventArgs e){
string directory = Server.MapPath("uploads");
string fExtension = Path.GetExtension(FileUpload1.PostedFile.FileName);
string fileName = "newFileName" + fExtension;
this.FileUpload1.SaveAs(Path.Combine(directory,fileName));
}
Hope this will solve your problem