Click here to Skip to main content
Sign Up to vote bad
good
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 29 Dec '12 - 20:18
Edited 29 Dec '12 - 20:22


2 solutions

Try the following :
string filename = System.IO.Path.GetFileName(fileUpload1.PostedFile.FileName);
  Permalink  
Comments
ridoy - 30 Dec '12 - 2:34
+5
Mehdi Gholam - 30 Dec '12 - 2:36
Cheers Ridoy!
ridoy - 30 Dec '12 - 2:45
:)
The Question is already answered at CodeProject
 
The name 'Path' does not exist in the current context[^]
 
hope it helped!
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 508
1 Arun Vasu 275
2 Maciej Los 228
3 OriginalGriff 215
4 Rohan Leuva 176
0 Sergey Alexandrovich Kryukov 9,670
1 OriginalGriff 7,409
2 CPallini 3,968
3 Rohan Leuva 3,352
4 Maciej Los 2,861


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 30 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid