.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Articles >> C# >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Extracting the Filename of a given path

Posted By:Suderson Sarathy       Posted Date: November 22, 2010    Points: 5    Category: C#    URL: http://www.dotnetspark.com  

Article on Extracting the File name from tge given path

separator = new char[] { '.', '\\' };
strSplitArr = UploadedFile.Split(separator);
return strSplitArr[strSplitArr.Count() - 2].ToString();
UploadedFile is a string Variable which contains the path,
 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend