ASP.NET:上传之前验证文件的大小(宽度和高度) [英] ASP.NET: Validate file size (width and height) before upload

查看:142
本文介绍了ASP.NET:上传之前验证文件的大小(宽度和高度)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一些方法之前验证影像尺寸(高度和宽度)把它上传到服务器?

Is there some way to validate the image size (height and width) before upload it to server?

我想使用Javascript,但我不知道怎么办。或者,也许有一些客户asp.net验证。

I think is using Javascript but I don't know how. Or maybe with some client asp.net validator.

任何意见?

推荐答案

这不能使用在客户端的JavaScript实现。也许你会发现写在闪光,Silverlight的或类似的文件上传组件,允许,限制文件的类型,大小和尺寸被上传。

This can't be done using javascript on the client-side. Maybe you'll find a file upload component written in flash, silverlight or similar that allows to restrict the files being uploaded by the type, size and dimensions.

这篇关于ASP.NET:上传之前验证文件的大小(宽度和高度)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆