var httpPostedFileBase = Request.Files.Get("DocumentFileName"); var myFileName = string.Empty; if (httpPostedFileBase != null) { int position = httpPostedFileBase.FileName.LastIndexOf('\\'); myFileName = httpPostedFileBase.FileName.Substring(position + 1); }
This blog is about my history as a software engineer utilizing technologies C#, Java, React, JavaScript, .NET Core, SQL Server , Oracle, GIT, GitHub, Jira, Azure, AWS and HTML5. “I have not failed. I've just found 10,000 ways that won't work.” Thomas A. Edison. Please click on all my ADVERTISING links to help support this blog. Thank you.
Wednesday, October 29, 2014
Get httpPostedFileBase FileName only code or extract last portion of file director path
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment