How to theme Browse button of a FileUpload control?

Discussion in 'ASP .Net' started by yeltsin27, Jul 20, 2006.

  1. yeltsin27

    yeltsin27 Guest

    Theming seems only to affect the text box of a FileUpload control, not
    the Browse button. Is there any way to theme the button as well?

    Thanks,

    ChrisN
     
    yeltsin27, Jul 20, 2006
    #1
    1. Advertisements

  2. I managed to accomplish this using FrontPage while working on a
    Sharepoint site a while ago. You can use the style attribute and then
    set border-color, border-width, etc. I would imagine a css class would
    be effective too, although I have not tried that with a FileUpload
    control.

    e.g.
    <asp:FileUpload ID="FileUpload1" runat="server"
    style="border-color:#b8b8b8;"/>

    Hope this helps.

    -Chris Lincoln
     
    Chris Lincoln, Jul 20, 2006
    #2
    1. Advertisements

  3. yeltsin27

    neilmcguigan Guest

    neilmcguigan, Jul 20, 2006
    #3
  4. yeltsin27

    tfsmag Guest

    It is not possible to style the actual button on an file upload. I have
    seen a hack that uses CSS to place a "fake" style over the top of the
    button.. here is a link that explains it better.

    http://www.quirksmode.org/dom/inputfile.html
     
    tfsmag, Jul 20, 2006
    #4
  5. yeltsin27

    LeeAdama

    Joined:
    Jan 28, 2012
    Messages:
    1
    Likes Received:
    0
    Straight forward styling of FileUpload without CSS hacks

    I found an excellent post about styling this without using any CSS hacks :) Mathias Kunto has a few lines of jQuery and some codebehind: http://blog.mathiaskunto.com/2012/0...aspfileupload-control-using-control-adapters/

     
    LeeAdama, Jan 28, 2012
    #5
    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.