Use my own button in input=file ??

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.
 
I

Iain Norman

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.
 
M

Michael

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top