I think you need to supply a physical path when using a saveas method. Try tring savePath = Server.MapPath("/images"); I assume the images directory is under your website root. Bruce DiscountASP.NET www.DiscountASP.NET
Server Error in '/' Application. The SaveAs method is configured to require a rooted path, and the path '../images/a3.gif' is not rooted. But folder exsist and all permision open code string savePath = @"../images/"; if (FileUpload1.HasFile) { string fileName = Server.HtmlEncode(FileUpload1.FileName); string extension = System.IO.Path.GetExtension(fileName); if ((extension == ".gif") | (extension == ".jpg") | (extension==".jpeg")) { savePath += fileName; FileUpload1.SaveAs(savePath); }