Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
string filename = Path.GetFileName(fileUpload1.PostedFile.FileName);


when i run i got the following error.

The name 'Path' does not exist in the current context

wat to do please help me.
Posted
Updated 29-Dec-12 20:22pm
v2

The Question is already answered at CodeProject

The name 'Path' does not exist in the current context[^]

hope it helped!
 
Share this answer
 
Try the following :
C#
string filename = System.IO.Path.GetFileName(fileUpload1.PostedFile.FileName);
 
Share this answer
 
Comments
ridoy 30-Dec-12 2:34am    
+5
Mehdi Gholam 30-Dec-12 2:36am    
Cheers Ridoy!
ridoy 30-Dec-12 2:45am    
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900