|
Hi,
I need to do image file validation in javascript...
I am using asp.net file upload control to select an image file....here i want to validate selected image file ( i.e., image file extension,size in bytes,content type) at client side using javascript. I have validated image file name extension (Ex : .jpg,jpeg etc),but I didn't find any solution to validate its size and content type in javascript.
Note: I can validate size using ActiveX object, but I am not going for that b'coz of browser issues.
I have tried the same in different way using Ajax.I wrote a method (Image validation method), which takes fileupload control object as its parameter,in codebehind file and tried to call this method from clent side using ajax.But I am unable to invoke that server side method by passing fileupload object from clentside method.
Can you please provide the solution either using javascript or ajax....
Thanks in advance.
Regards Lavanya
|