File Upload Code ASP.NET + C#
May 3, 2011 at 10:06 am Leave a comment
string FilePath = “”;
string[] a = new string[1];
string fileName = “”;
string FullName = “”;
if (FileUploader.FileName.Length > 0)
{
a = FileUploader.FileName.Split(‘.’);
fileName = Convert.ToString(System.DateTime.Now.Ticks) + “.” + a.GetValue(1).ToString();
FilePath = Server.MapPath(@”~\SavedFolder”);
Fup1.SaveAs(FilePath + @”\” + fileName);
FullName = FilePath + @”\” + fileName;
// Database Saved Code
}
Advertisement
Entry filed under: asp.net, C#. Tags: asp.net c# fileupload, asp.net file upload, file upload.

Trackback this post | Subscribe to the comments via RSS Feed