Re: filenames / extensions with file uploads
From: Eric Lawrence [MSFT] (e_lawrence_at_hotmail.com)
Date: 03/03/04
- Next message: Eric Lawrence [MSFT]: "Re: Monitor system"
- Previous message: Steven Cheng[MSFT]: "RE: Nested PlaceHolders"
- In reply to: Lauchlan M: "filenames / extensions with file uploads"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Mar 2004 18:30:45 -0800
I believe the File and Directory objects have static methods to parse the
string into its components.
-- Thanks, Eric Lawrence Program Manager Assistance and Worldwide Services This posting is provided "AS IS" with no warranties, and confers no rights. "Lauchlan M" <LMackinnon@Hotmail.com> wrote in message news:#rFpQjDAEHA.3184@TK2MSFTNGP09.phx.gbl... > Hi > > I'm doing a file upload and I get > > //get the filename > string FullFileNameAndPath = fileDischargeFile.PostedFile.FileName; > > This returns the full filepath, eg c:\folder\filename.ext > > What I want to do is get the filename (as 'filename.ext') and the extension > (as '.ext') from this full path. > > What are the best .net methods/namespaces to use for this? > > Thanks > > Lauchlan M > >
- Next message: Eric Lawrence [MSFT]: "Re: Monitor system"
- Previous message: Steven Cheng[MSFT]: "RE: Nested PlaceHolders"
- In reply to: Lauchlan M: "filenames / extensions with file uploads"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|