Hii
I have an application in asp.net with c#.
In this application different files(like .txt, .pdf, .jpg, .doc) are stored in one folder
Now i want to get extension from file name only
means if name of file is test.doc i want to get extension from asp.net page in which i have only name of file(ex test only, i dont have extension here)
Please help me
Thanks in advance
Rahul patel
Loading

Suthish NairRank #92 · 22.8K reputationPosted Oct 21, 2010, 9:46 PM EDT
Csharp patel7 reputationPosted Oct 21, 2010, 9:58 PM EDT
string extention = Path.GetFullExtension(Server.MapPath(Request.ApplicationPath + @"\Quatation\") + id);
i have stored files with id in my folder that can be of any type like .txt or .doc or .jpg etc..
but from my page i can retrieve only id and i want to get extension or full name with extension from my folder
means if the name of file stored in folder is 14.doc
i have id(14) in my page.
how can i get full name with extension or extension of file 14 from my page?
thanks in advance
Suthish NairRank #92 · 22.8K reputationPosted Oct 21, 2010, 10:07 PM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Oct 22, 2010, 3:25 AM EDT
Suthish NairRank #92 · 22.8K reputationPosted Oct 25, 2010, 12:06 AM EDT