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 NairPosted Oct 25, 2010, 4:06 AM
Sam HobbsPosted Oct 22, 2010, 7:25 AM
Suthish NairPosted Oct 22, 2010, 2:07 AM
Csharp patelPosted Oct 22, 2010, 1:58 AM
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 NairPosted Oct 22, 2010, 1:46 AM