Click here to Skip to main content
15,947,389 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I want to display the fileupload control browser when the button click, and after that in the file upload browser
it display all the files( file type is All files in the bottom), now i need only display the image format(jpg,gif,png)
when the file upload browser open, please send the coding to me. thanks in advance.
Posted
Updated 11-Sep-22 23:11pm

No need of this. You cannot restrict. But there is a way. Refer - Limit file format when using <input type=“file”>?[^].

You should ideally validate the file type - ASP.Net FileUpload : File Extension Validation[^].
 
Share this answer
 
v2
we have to add accept and there extension <asp:fileupload runat="server" id="EDIt_LOAD" accept=".png,.jpg,.jpeg,.gif">
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900