Use my own button in input=file ??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there, I have read posts that say you can change certain style attributes
of this html control but we actually have defined buttons for our site, and
the browse button in this control just doesnt conform to this. I would really
like to create a bespoke button to use with the control. Can I do this (dont
think so)? If not, I'll probably have to produce my own text box with a
button which opens a file browser window, then places the path in this text
box. Does anyone have any examples on how to do this? I am using c# .net and
javascript. thanks.
 
Hi there, I have read posts that say you can change certain style attributes
of this html control but we actually have defined buttons for our site, and
the browse button in this control just doesnt conform to this. I would really
like to create a bespoke button to use with the control. Can I do this (dont
think so)? If not, I'll probably have to produce my own text box with a
button which opens a file browser window, then places the path in this text
box. Does anyone have any examples on how to do this? I am using c# .net and
javascript. thanks.

You won't be able to write to the path property of a file/browse input
control for security reasons.
 
I've had the same problem and just wound up using the standard html control.
So now I have this one ugly gray button that doesn't conform to the design
spec.

I know that somehow the html file input control resolves the local file to
something that the server can understand because we have this HTTPPostedFile
object which is readonly. If I can find out how this resolution happens,
I'll let you know.
 
Back
Top