how to get the file path in C#.net

Posted by Kavi.Sirius under C# on 5/15/2012 | Points: 10 | Views : 1870 | Status : [Member] | Replies : 3
hi,
i want to get the file path using c#.net
i am using the folderviewcontrol to view the all folder and files in particular users

if the user know the filename
they enter the file name in textbox
it show the path for that file in another textbox

Thanks in advance..

Regards
Kavi.n



Responses

Posted by: Siva524 on: 5/15/2012 [Member] Starter | Points: 25

Up
0
Down
according to your requirement first of all we need to check whether the file exists and also check type of file extension(there may be same name with different extensions).
if file exists and extension also same then
get the file path.

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: perfectchourasia-9163 on: 6/8/2012 [Member] Starter | Points: 25

Up
0
Down
String File=Server.mappath("/Upload") + Filename;

ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://www.aspnetcodes.com/

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ajay.Kalol on: 6/8/2012 [Member] Starter | Points: 25

Up
0
Down
Use "Server.MapPath("/path/filename"); "

Ajay
ajaypatelfromsanthal.blogspot.in

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response