Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I used file upload control to upload the files,
for that I need to save extension of that file to my database
for that I used
string str= Path.GetExtension(FileUpload1.PostedFile.FileName);


when I run my app I am getting the follwoing error
"The name 'Path' does not exist in the current context"
why what does it mean?
Posted
Updated 16-Jun-17 8:18am
v2

Use

System.IO.Path
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 4-Feb-11 1:53am    
Simple as that - a 5.
I would also said "shame on you" to OP :-)
--SA
sasirekhareddy 7-Sep-13 7:48am    
works fine
Sandeep Mewara 4-Feb-11 3:37am    
Common OP is a beginner, it happens! :)
for this there is only one solution that is
use namespace
System.IO;
 
Share this answer
 
Comments
balu.n6 3-Apr-12 9:27am    
i tried but doesn't solve the problem

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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