Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 393187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:13:58+00:00 2026-05-12T16:13:58+00:00

I have a web application with a simple file upload requirement (max 1 mb).

  • 0

I have a web application with a simple file upload requirement (max 1 mb).
The web application is an externally exposed web site that must be (as much as possible) compatible with all browsers and versions.

We are using C# .net 3.5 ASP .Net (IIS 7) technology.

We are having trouble implementing the file upload control:

<input type="file" ... />

The buttons are not clicking correctly and different input methods (eg clicking on the text box in some browsers will open the input field).

We need to avoid 3rd party file upload tools.

What is the best way to make this compatible with all browsers?
Can we use frameworks (eg we could use JQuery) to do this?

Any help is really appreciated.

Edit:

Here are some more specific behaviour details:

Intended/Expected:

Consistent use of textbox field (for filename):

  • displays filename of selected file
  • no events fire launch of browse dialog

Consistent use of browse button:

  • same css standards as standard HTML button for look and feel
  • opens browse dialog
  • dialog cancel – clears textbox field
  • dialog ok – (re)populates textbox field

We would like to have the look and feel of the textbox and button to use the same css as the rest of our web site.

Current:

  • textbox click events opens dialog
  • generic display of textbox and button field
  • browse button not working with some browsers (not firing browse dialog event, but being displayed)

As much as possible the behaviour (events/actions as above) should be consistent between all browser types.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:13:58+00:00Added an answer on May 12, 2026 at 4:13 pm

    What is the best way to make this compatible with all browsers?

    It’s already compatible with all browsers. Just don’t try too hard to script it or overhaul the style. You have minimal customisation possibilities with the file upload field, partly for obvious security reasons and partly because the multiple-part rendering of the text+button arrangement in many browsers is simply not amenable to styling primitives that operate on single boxes.

    (eg clicking on the text box in some browsers will open the input field).

    Luckily people whose browsers do that will already be used to file upload fields doing that; indeed, they will expect the browser to do that, and be confused if you manage to stop it.

    (And it’s a sensible measure: allowing typing in the filename field is seldom useful, but it has caused security holes in the past.)

    Consistent use of browse button:

    Nothing about the file upload field even mandates a browse button or file-finder dialogue box. You might have eg. drap and drop instead. The browser decides this; as the site author you don’t get a look in.

    We would like to have the look and feel of the textbox and button to use the same css as the rest of our web site.

    This isn’t really possible within the realms of HTML. Hence the “third party uploaders”, typically Flash with HTML fallback.

    There is one approach that you can sort-of use to make a file upload look like you want, but it’s not very nice. You style a text field and button however you like, listen for changes to the file upload field and copy the value to the text field to display. The text field must be read-only because it won’t be possible to allow the user to pick a file from there.

    You then put the real file upload control on top of the fake one with CSS positioning, and give it CSS opacity (alpha filter in IE) so it’s so faint you can’t see it. You then have to hope that the browser decides to put a clickable part of the file upload field over the top of where you have rendered your button. Though you can fiddle and check it to work in many popular browsers, it’s really very brittle and almost certainly a complete waste of time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 213k
  • Answers 213k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you are not modifying any of the values after… May 12, 2026 at 10:32 pm
  • Editorial Team
    Editorial Team added an answer Eval is a method on Page (on TemplateControl actually, which… May 12, 2026 at 10:32 pm
  • Editorial Team
    Editorial Team added an answer (Note: this answer refers exclusively to the "standard" drag implementation… May 12, 2026 at 10:32 pm

Related Questions

I'm planning to write a web application (.net probably) that will need to analyze
I have a java webapp which needs to upload files via http and then
What I want to achieve is simple: I have a website, say my-site -
I've recently inherited a database driven e-commerce site written in C# ASP.Net, with an

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.