In run mode as follows
Course Type REO 5 Days(textbox1)
I have one folder in D path. in D drive file as follows
REO 5 Days.htm
I want to validate REO 5 Days textbox1 value and D drive file name REO 5 days must be the same.
if textbox1 and d drive file name must be the same show the file.
Otherwise show the message filename and textbox name not same.
for that how can i validate using c#.
How to validate filename and textbox in asp.net using c#
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 6, 2014, 12:11 AM EST
string path = "C:\\stagelist.txt";
string extension = Path.GetExtension(path);
string filename = Path.GetFileName(path);
string filenameNoExtension = Path.GetFileNameWithoutExtension(path);
string root = Path.GetPathRoot(path);
Go through this link u will get some help
http://msdn.microsoft.com/en-us/library/system.io.file.exists%28v=vs.110%29.aspx