0
Posted on 3:48 PM by prajeesh and filed under ,
We can upload images very easily using File upload control in asp.net, also you can validate the upload the file type using Reguler expression validator, following is the regular expression validation control code for validating image types such as jpg, png and bmp.
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
ErrorMessage="Upload a valid image (jpg/png/bmp)"
ValidationExpression ="^.+\.((jpg)(JPG)(gif)(GIF)(jpeg)(JPEG)(png)(PNG)(bmp)(BMP))$"
ControlToValidate="fupImage" ValidationGroup="Author_reg"> Upload a valid image;</asp:RegularExpressionValidator>
Shout it kick it on DotNetKicks.com
0
Responses to ... Client side image upload validation in asp.net