How to restrict file type in FileUpload control

后端 未结 8 2089
清歌不尽
清歌不尽 2020-11-30 09:29

Is it possible to allow the fileupload control to show only images?

When we click the Browse button it should show only images.

8条回答
  •  独厮守ぢ
    2020-11-30 10:23

    In 2015, web browsers support the input accept attribute, so you can do this:

    
    

    Keep in mind Visual Studio may show you a message about this as an invalid attribute of the FileUpload ASP tool, however.

提交回复
热议问题