In 2015, web browsers support the input accept attribute, so you can do this:
<asp:FileUpload ID="fileUploader" runat="server" accept=".png,.jpg,.jpeg,.gif" />
Keep in mind Visual Studio may show you a message about this as an invalid attribute of the FileUpload ASP tool, however.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…