hi,
use this below code to upload file in folder
public bool fnFileUpload(string FilePath, FileUpload FileUpload)
{
BinaryReader br = new BinaryReader(FileUpload.PostedFile.InputStream);
FileStream fstm = new FileStream(FilePath, FileMode.Create, FileAccess.ReadWrite);
BinaryWriter bw = new BinaryWriter(fstm);
byte[] buffer = br.ReadBytes(FileUpload.PostedFile.ContentLength);
br.Close();
bw.Write(buffer);
bw.Flush();
bw.Close();
return true;
}
In the above code filepath is nothing but filename with the directory location ex:c:\temp\Myfile.txt
the code will save the file in file system only.
Send the FilePath value to the database and retrieve this info when read is required
I hope this will help