naresh athmakuri

naresh athmakuri

  • 1.9k
  • 43
  • 2.6k

how to validate a file exists or not in asp.net using C#

Aug 11 2019 1:53 AM
I tried the below one
 
string path=txtPath.Text;
bool isExists=File.Exists(path);
 
it is working fine in my local system but when i am sharing with network it is returning fals
can you please suggest me what is the best way to validate path will work in all cases
thank you

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (5)