views:

242

answers:

4

I am using the fileupload control in asp.net. I want the browser to only show pictures. I am currently using validation to ensure they only select images but how can I make the browser only search for images?

+1  A: 

You can't (unless you implement a Silverlight or Flash solution).

Mark Brackett
A: 

you can verify with javascript if the ending is allowed.

also, what most of the websites does, is that they stop the transfer after the max. data size (1 meg, 4 meg etc.)

cRichter
A: 

Using pure HTML + JavaScript, I believe you can't, you'll need to check on server-side. You could maybe do what you want if you use a Flash uploader (like Flickr does), but that may not be applicable for you.

JonoW
+1  A: 

Out of the box, like Mark said it is not possible. But you could implement a filtering in javascript but i suspect you already know it's possible. if not, check this post

zaladane