View Single Post
  #1 (permalink)  
Old January 5th, 2009, 09:51 PM
PeterPeiGuo PeterPeiGuo is offline
Authorized User
Points: 240, Level: 4
Points: 240, Level: 4 Points: 240, Level: 4 Points: 240, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2008
Location: , , .
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default fileupload control - disable input

I use a fileupload control on one of my asp.net page. It turned out that fileupload behaves differently with IE and Firefox:
  1. IE allows one to enter path and file name through the textbox (part of the fileupload), but
  2. Firefox only allows one to select file through through file dialog and the textbox is disabled/readonly.
I actually like Firefox behavior better, saving some error checking. The question is how to make IE behave the same way... I can easily add event handler through javascript to handle this, make keypress etc always return false. But... is there a simpler way, for example through some sort of property setting...

Also, with Firefox, when one clicks the textbox area, it automatically brings up the file dialog. Can I do this with IE?? (haven't actually tried, but while I am typing... this came to my mind: maybe I can trigger the click even of the upload button, when one clicks inside the textbox...)

If you have any experience with this, please share...

Last edited by PeterPeiGuo : January 5th, 2009 at 09:53 PM.
Reply With Quote