Using HtmlInputFile to download file by sending filename via URL

Discussion in 'ASP .Net' started by Vaquar, Feb 5, 2008.

  1. Vaquar

    Vaquar Guest

    Hello,
    There are examples available using HtmlInputFile and this controls works
    when user clicks the button to select file from client browser.

    However, my requirement is to use this control via URL. I want to pass
    client's file name via URL and automate download file to server.
    Documentation mentions that this is for security reason that you can't
    initialize this control. But I just want to confirm this.

    Thank you
     
    Vaquar, Feb 5, 2008
    #1
    1. Advertisements

  2. Hi,

    For security purposes, selected file property of file input control is
    read-only. You can't just set the path and start taking the files from
    client's computer.

    If you really want to do that, you may need to develop an ActiveX control
    and ask user to install it. It is an another story how to develop ActiveX
    controls for browsers.

    --
    All the best,
    Coskun SUNALI
    MVP ASP/ASP.NET
    http://sunali.com
    http://www.propeople.dk
     
    Coskun SUNALI [MVP], Feb 5, 2008
    #2
    1. Advertisements

  3. Vaquar

    Vaquar Guest

    Thank you for confirming this and for quick response.
     
    Vaquar, Feb 5, 2008
    #3
  4. Coskun SUNALI [MVP], Feb 5, 2008
    #4
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.