本文是小编为大家收集整理的关于在asp.net的文件上传控件中验证以kb为单位的图像大小的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。
问题描述
如何验证在 asp.net 文件上传控件中上传的图像必须小于 700 kb.没有 web.config 方法.或者如果来自 web .config 方法,请给出错误 handler.thanx
推荐答案
图像大小.
在上传到服务器之前
你不能.
上传到服务器后FileInfo fno = new FileInfo("c:\\test.txt"); //length in bytes long bytes = fno.Length;
谢谢
--RA
问题描述
how can i validate that image being uploaded in asp.net file upload control must be less than 700 kb . without web.config method .or if from web .config method ,please give error handler.thanx
推荐答案
Image size.
before uploading to the server
you can''t.
After upload to the server
FileInfo fno = new FileInfo("c:\\test.txt"); //length in bytes long bytes = fno.Length;
Thanks
--RA
相关标签/搜索
基于token的会话
json.stringify深层
MindManager思维导图
iis虚拟目录与开发服务器的区别
小程序innerAudioContext保持单个播放
www.kaggle.com怎么注册
pycharm 配置gradle
wpf 程序异常退出
NewProxyConnection类下的close方法
ssh强制升级后任意密码可登录
为什么定义画笔预设命令的所选区域是空的
ios uitextview xib 高度
asp.net
validation
file-upload
c#
jquery
.net
ASP.NET
image
C#3.5
Javascript