I want to set a download link in my gridview , the thing is that I have set a physical path while Uploading the file and saving the file name and its pyshical path in the database
if (fileUpTimeTable.HasFile)
{
string TimeTableFileName = fileUpTimeTable.FileName;
string TimeTableFilepath = "D:\\My_Drive\\Kunal_backup\\Kunal\\StudentDesk_aarti\\StudentDeskv2\\Download\\TimeTable\\";
fileUpTimeTable.SaveAs(TimeTableFilepath+fileUpTimeTable.FileName);
FillGrid();
}
The Uploading works fine and the file and its filepath gets saved in the database successfully.
The gridview also shows the correct data but I am not able to download the uploaded file from the gridview
Following are Database fields
ID --Pkey
FILENAME -- e.g abc.pdf
FILEPATH --
D:\My_Drive\Kunal_backup\Kunal\StudentDesk_aarti\StudentDeskv2\Download\TimeTable\abc.pdf
Please guide me how can I accomplish the same
<asp:HyperLinkField DataNavigateUrlFields="FILENAME" DataNavigateUrlFormatString="{0}"
Text="<img src='../IMAGES/download.jpg' style='border:none'>" HeaderText="Download" Target="_blank"/>
P.S : I am not using Virtual path , but Physical because I need to share these uploaded file between two different Project Solutions