I would like to get the full path of the file upload control in the string variable. The file may be stored in any location other than the root of the project. Anybody please help out.
The situation is:
string file = Path.GetFileName(ExcelFileUpload.FileName);
if (file.EndsWith(".xlsx"))
{
// Reading from a binary Excel file (format; *.xlsx)
FileStream stream = File.Open(file, FileMode.Open, FileAccess.Read);