Capture Path from upload file control

Discussion in 'ASP .Net' started by syd, Dec 2, 2003.

  1. syd

    syd Guest

    I have an intranet app that i would like to just capture the Path contained
    in the file field html control. The app will reside on an intranet and we
    all will have access to this path - it seems a waste to upload the file.
    The browse button will capture the path just fine, and display it in the
    associated text box. But i can't see to find a way to capture that path on
    postback....

    I tried looking in the form fields collection but it doesn't seem to be
    there. I would hate to have to captuer it in some javascript on the
    client.

    Stuck in the middle of nowhere
    Syd
    syd, Dec 2, 2003
    #1
    1. Advertising

  2. syd

    vMike Guest

    Try something like this.
    HttpContext.Current.request.files(0).filename
    "syd" <> wrote in message
    news:Xns94458F92860D2SydKAHNatYahoocom@207.46.248.16...
    > I have an intranet app that i would like to just capture the Path

    contained
    > in the file field html control. The app will reside on an intranet and we
    > all will have access to this path - it seems a waste to upload the file.
    > The browse button will capture the path just fine, and display it in the
    > associated text box. But i can't see to find a way to capture that path

    on
    > postback....
    >
    > I tried looking in the form fields collection but it doesn't seem to be
    > there. I would hate to have to captuer it in some javascript on the
    > client.
    >
    > Stuck in the middle of nowhere
    > Syd
    vMike, Dec 2, 2003
    #2
    1. Advertising

  3. syd

    Vaibhav Guest

    If i am undertsanding your question correct, then this is the way to get the
    path

    (associatedtextboxName.PostedFile.FileName) and the control should be a
    server side control.

    HTH


    "syd" <> wrote in message
    news:Xns94458F92860D2SydKAHNatYahoocom@207.46.248.16...
    > I have an intranet app that i would like to just capture the Path

    contained
    > in the file field html control. The app will reside on an intranet and we
    > all will have access to this path - it seems a waste to upload the file.
    > The browse button will capture the path just fine, and display it in the
    > associated text box. But i can't see to find a way to capture that path

    on
    > postback....
    >
    > I tried looking in the form fields collection but it doesn't seem to be
    > there. I would hate to have to captuer it in some javascript on the
    > client.
    >
    > Stuck in the middle of nowhere
    > Syd
    Vaibhav, Dec 2, 2003
    #3
    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. Caio

    Capture the file path

    Caio, Aug 5, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    549
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=
    Nov 30, 2004
  2. =?Utf-8?B?U2FyYXY=?=

    Upload a file without file Upload control - ASP.Net

    =?Utf-8?B?U2FyYXY=?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,419
    Bruce Barker
    Aug 3, 2005
  3. Chip

    Capture data before file upload

    Chip, Apr 13, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    436
  4. Max
    Replies:
    7
    Views:
    9,077
  5. Caio

    Capture the file path

    Caio, Aug 5, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    108
    Charles Chen
    Aug 6, 2004
Loading...

Share This Page