Problems with HTMLInputFile Control

Discussion in 'ASP .Net Web Controls' started by Nayak, May 26, 2005.

  1. Nayak

    Nayak Guest

    On my web page, I want to let the user be able to browse for a file and
    select it. For this i have used HTMLInputFile Control. But here I want to
    restrict the type of the files the user can select. The user should be
    presented the File open dialog box to pick his file.
    How to do that ????

    Further more I don't want the Text "Browse..." on the Button instead I want
    "...". How to do that ?????


    I am using ASP.Net with C# as the code behind
     
    Nayak, May 26, 2005
    #1
    1. Advertisements

  2. Nayak

    Patrice Guest

    1) Try
    http://msdn.microsoft.com/library/d.../author/dhtml/reference/properties/accept.asp
    but it depends upon the browser

    2) A trick would be to hit this button and add your own (that would trigger
    the click event of the hidden button). IMO even this kind of scenario could
    be made more restrictive later (for safety reasons it's likely the trend is
    that this button will awlasy have the same appearence so that users are
    supposed to know to this file).

    Beyond that you'll have to swith to an ActiveX control, an applet, a .NET
    control etc...

    Patrice


    --

    "Nayak" <> a écrit dans le message de
    news:%...
    > On my web page, I want to let the user be able to browse for a file and
    > select it. For this i have used HTMLInputFile Control. But here I want to
    > restrict the type of the files the user can select. The user should be
    > presented the File open dialog box to pick his file.
    > How to do that ????
    >
    > Further more I don't want the Text "Browse..." on the Button instead I

    want
    > "...". How to do that ?????
    >
    >
    > I am using ASP.Net with C# as the code behind
    >
    >
     
    Patrice, May 26, 2005
    #2
    1. Advertisements

  3. Nayak

    Guest Guest

    Hi
    Do you have a solution to this yet?

    TIA

    "Nayak" <> wrote in message
    news:%...
    > On my web page, I want to let the user be able to browse for a file and
    > select it. For this i have used HTMLInputFile Control. But here I want to
    > restrict the type of the files the user can select. The user should be
    > presented the File open dialog box to pick his file.
    > How to do that ????
    >
    > Further more I don't want the Text "Browse..." on the Button instead I

    want
    > "...". How to do that ?????
    >
    >
    > I am using ASP.Net with C# as the code behind
    >
    >
     
    Guest, Jun 5, 2005
    #3
    1. Advertisements

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. George Durzi
    Replies:
    1
    Views:
    457
    George Durzi
    Aug 29, 2003
  2. Mark
    Replies:
    2
    Views:
    2,984
  3. Frank
    Replies:
    0
    Views:
    436
    Frank
    Nov 21, 2003
  4. Replies:
    4
    Views:
    1,207
  5. Al Smith

    HTMLInputFile control and validation.

    Al Smith, Jan 20, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    2,344
    Steven Cheng[MSFT]
    Jan 23, 2004
  6. Rob Meade
    Replies:
    9
    Views:
    1,512
    ASP.Confused
    Jul 20, 2004
  7. Grant Harmeyer

    Uploading File w/o HtmlInputFile control

    Grant Harmeyer, Aug 30, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    844
  8. Nayak
    Replies:
    2
    Views:
    517
    Guest
    Jun 5, 2005
Loading...