开发者

Limiting the filetypes dropdownlist options in the asp.net FileUpload control

开发者 https://www.devze.com 2022-12-17 07:04 出处:网络
I know how to validate this client and server side by extension and MIME type.That\'s fine, implemented, ready to go.

I know how to validate this client and server side by extension and MIME type. That's fine, implemented, ready to go.

What I want to do is in the file upload dialog there is the li开发者_如何学Gottle drop down list that by default shows "All Files." I have seen similar controls in other sites and programs that effectively sort the directory for the user by the different options in the drop down ( just music files or just images, sometimes with the "All Files" option, sometimes not) and limit the user from seeing any file that isn't in the list.

How do I do that?


There is not a consistent way to accomplish this the way you are wanting to without adding dependencies.

You may be able to make use of the accept attribute of the input tag, but browser support for this is lacking. See this question for more information.

0

精彩评论

暂无评论...
验证码 换一张
取 消