Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Method to return the base filename of a HttpPostedFile?


Message #1 by "Oliver, Wells" <WOliver@l...> on Mon, 21 Oct 2002 10:59:03 -0700
HttpPostedFile.FileName returns the fully qualified client filename, but I
just want the basename (e.g. "test.gif" rather than "C:\Windows\Test.gif")?

Is there any proper method for this or do I need to split an array by "\"s
and go from there? Thanks!

Wells Oliver
Web Application Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com

Message #2 by "Mingkun Goh" <mangokun@h...> on Fri, 25 Oct 2002 10:37:11
Use the 
Path.GetFileName method.


Previous message:

> HttpPostedFile.FileName returns the fully qualified client filename, but 
I
just want the basename (e.g. "test.gif" rather than "C:\Windows\Test.gif")?

Is there any proper method for this or do I need to split an array by "\"s
and go from there? Thanks!

Wells Oliver
Web Application Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com


  Return to Index