Wednesday, May 29, 2013

How to validate images by regular expression?

<input type=file id="pp" runat="server" />

<asp:RegularExpressionValidator ID="p" runat="server" ValidationGroup="l" ControlToValidate="pp"

ValidationExpression="(.*\.([gG][iI][fF]|[jJ][pP][gG]|[jJ][pP][eE][gG]|[bB][mM][pP]|[pP][nN][gG])$)" >*</asp:RegularExpressionValidator>





<asp:Button ID="btm" runat="server" ValidationGroup="l" Text="submit"

onclick="btm_Click" />

No comments:

Post a Comment