i hope it's help you
following code for database
string filePath = fileupload.PostedFile.FileName;
string CommFilename = System.IO.Path.GetFileName(filePath);
add this field [CommFilename] into database
following code for saving file in folder
function upload()
{
string filePath = fileupload.PostedFile.FileName;
string fileName = System.IO.Path.GetFileName(filePath);
string serverFolderPath = Server.MapPath("..");
fileupload.PostedFile.SaveAs(serverFolderPath + "\\" + fileName);
}