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


Top 5 Contributors of the Month
david stephan

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:

Responses

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