File Chooser...

Discussion in 'ASP .Net' started by =?Utf-8?B?Unlv?=, Sep 16, 2005.

  1. Hello !

    I want to do a button on a page that propose to choose a file (on the client
    side) and get the path of the file.
    I know that there are the HTMLInputFile and the FileUpload control, but I
    don't want that the user can see the location of the file in a textbox.
    A solution ?
    Thanks.
     
    =?Utf-8?B?Unlv?=, Sep 16, 2005
    #1
    1. Advertising

  2. Security in IE prevents you from doing almost anything to a "file" type input
    control. The best I could come up with was putting this style on it:

    style="width:1; BORDER-RIGHT: white thin solid; BORDER-TOP: white thin
    solid; BORDER-LEFT: white thin solid; COLOR: white; BORDER-BOTTOM: white thin
    solid; BACKGROUND-COLOR: white"

    This does what you say, and the user can't see the text or the textbox. It
    makes the button look a little weird though. And no, you can't hide the file
    control and use another button to "script click" it. I tried. =) IE security
    prevents it.


    "Ryo" wrote:

    > Hello !
    >
    > I want to do a button on a page that propose to choose a file (on the client
    > side) and get the path of the file.
    > I know that there are the HTMLInputFile and the FileUpload control, but I
    > don't want that the user can see the location of the file in a textbox.
    > A solution ?
    > Thanks.
     
    =?Utf-8?B?QW5keSBMdWtzaWM=?=, Sep 16, 2005
    #2
    1. Advertising

  3. You can hide the html input file in IE. All you need to do is put it inside
    a DIV tag. I saw this example somewhere else on these newsgroups.

    Eg.
    <div style="VISIBILITY: hidden; WIDTH: 0px; HEIGHT: 0px"><INPUT
    id="fileBrowse" type="file"></div>
     
    =?Utf-8?B?UHVQdQ==?=, Dec 2, 2005
    #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. Szymon Madejczyk
    Replies:
    2
    Views:
    537
    Szymon Madejczyk
    Sep 15, 2003
  2. Robert M. Gary

    URL file chooser

    Robert M. Gary, Jan 31, 2006, in forum: Java
    Replies:
    2
    Views:
    548
    Robert M. Gary
    Jan 31, 2006
  3. Replies:
    7
    Views:
    575
    Oliver Wong
    Feb 17, 2006
  4. Replies:
    0
    Views:
    370
  5. Agent Smith

    Using File Chooser Under NetBeans

    Agent Smith, Jun 9, 2008, in forum: Java
    Replies:
    6
    Views:
    1,107
    Andrew Thompson
    Jun 29, 2008
Loading...

Share This Page