Wednesday, October 29, 2014

Get httpPostedFileBase FileName only code or extract last portion of file director path

var httpPostedFileBase = Request.Files.Get("DocumentFileName");
               var myFileName = string.Empty;
               if (httpPostedFileBase != null)
               {
                   int position = httpPostedFileBase.FileName.LastIndexOf('\\');
                   myFileName = httpPostedFileBase.FileName.Substring(position + 1);
               }

No comments:

How browsers render web pages

How Browsers Render Web Pages Introduction to Browser Rendering When you enter a web address or click a link, your browser begins a ...