Problems with HTMLInputFile Control

N

Nayak

On my web page, I want to let the user be able to browse for a file and
select it. For this i have used HTMLInputFile Control. But here I want to
restrict the type of the files the user can select. The user should be
presented the File open dialog box to pick his file.
How to do that ????

Further more I don't want the Text "Browse..." on the Button instead I want
"...". How to do that ?????


I am using ASP.Net with C# as the code behind
 
P

Patrice

1) Try
http://msdn.microsoft.com/library/d.../author/dhtml/reference/properties/accept.asp
but it depends upon the browser

2) A trick would be to hit this button and add your own (that would trigger
the click event of the hidden button). IMO even this kind of scenario could
be made more restrictive later (for safety reasons it's likely the trend is
that this button will awlasy have the same appearence so that users are
supposed to know to this file).

Beyond that you'll have to swith to an ActiveX control, an applet, a .NET
control etc...

Patrice
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top