FIleUpload and file name saving

Discussion in 'ASP .Net' started by nicknack, Jan 15, 2007.

  1. nicknack

    nicknack Guest

    Hello.
    I would like to give my user the option to browse his files (like the
    simple fileUpload control do) and after selecting the file (and when
    the fileUpload control hold in his text box the full path and file
    name) I want to press another button and get the path+file name as a
    string.

    I want to do this with out actually upload the file. I use the
    fileupload just for his browsing option.

    the problem is that after selecting the file, the fileupload have a
    property called "fileName" that only return the file name and not the
    path.

    Also, if i type a file name myself and not choosing it with the browse
    - It doesn't even recognaize it as a file name.

    Any help?
    How can I have a simple browsing control that save path+file name?

    thanks!
     
    nicknack, Jan 15, 2007
    #1
    1. Advertising

  2. nicknack

    Saber Guest

    Hello,

    try it:

    FileUpload1.PostedFile.FileName

    "nicknack" <> wrote in message
    news:...
    > Hello.
    > I would like to give my user the option to browse his files (like the
    > simple fileUpload control do) and after selecting the file (and when
    > the fileUpload control hold in his text box the full path and file
    > name) I want to press another button and get the path+file name as a
    > string.
    >
    > I want to do this with out actually upload the file. I use the
    > fileupload just for his browsing option.
    >
    > the problem is that after selecting the file, the fileupload have a
    > property called "fileName" that only return the file name and not the
    > path.
    >
    > Also, if i type a file name myself and not choosing it with the browse
    > - It doesn't even recognaize it as a file name.
    >
    > Any help?
    > How can I have a simple browsing control that save path+file name?
    >
    > thanks!
    >
     
    Saber, Jan 15, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Kandell
    Replies:
    4
    Views:
    4,234
    eeebop
    Dec 10, 2004
  2. Luis Esteban Valencia
    Replies:
    0
    Views:
    2,558
    Luis Esteban Valencia
    Jan 6, 2005
  3. i730lover
    Replies:
    0
    Views:
    786
    i730lover
    Jul 21, 2006
  4. David Thielen

    FileUpload, Wizard, and saving the data

    David Thielen, May 2, 2006, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    249
    Steven Cheng[MSFT]
    May 4, 2006
  5. Lovely Angel For You

    Saving Images While Saving ASP Pages !

    Lovely Angel For You, Oct 2, 2003, in forum: ASP General
    Replies:
    1
    Views:
    233
    Curt_C [MVP]
    Oct 3, 2003
Loading...

Share This Page