Can I restrict the asp.net file download dialog to view only XML files? (Filer, only .xml)
Note. Do not check if the extension is .xml, but actually allow the user to view the xml files in the dialog box.
It's impossible.
Unfortunately, you cannot set a filter for the file browser dialog - you need to use JavaScript or server-side validation to expand.
Upd. You can use the regex validator with the following regex line:
@"(.*?)\.(jpg|jpeg|png|gif)$"
Source: https://habr.com/ru/post/1753296/More articles:Is it always better to use asp control? - asp.netC # Why is it not possible to set specific GUI actions in winform constructor? - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1753293/how-to-restrict-the-files-to-image-type-using-file-upload-in-aspnet&usg=ALkJrhhOPbe2H3nAECAFjS5iTR-N8qnhAAIn Perl, what is the difference between if (% hash) and if (defined by% hash)? - perlDownload images and then disappear - browserUITextField Cancels First iOS4 Responder - iphoneCreating a PHP script to run as a cron job - using the Zend Framework library - phpmemcpy problem - cThe image is drawn stretched to the HTML canvas when it is created using jQuery - jqueryКак решить, когда выполнять DLL? - dllAll Articles