且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在文件上传中预先验证图像大小

更新时间:2023-12-03 19:21:10

您不需要为"Page_ClientValidate("groupName")编写代码
因为它是我们在页面上使用任何验证控件时预定义的
然后asp.net允许您使用此方法验证字段值....

您只需调用此函数即可..

希望你能理解..

因为我的英语不好..::(
you don''t need to write code for "Page_ClientValidate("groupName")"
because it''s predefined when we use any validation control on the page
then the asp.net allow you to validate field value using this method....

you just call this function it will work..

I hope you understand..

because my English is poor.. :(


嘿,你为什么不应该尝试javascript


Hey why should not you try javascript


<script type="text/javascript">
function OnBrowse()
{
if(Page_ClientValidate("I"))
{
///Your login here......
alert("something....");
return false;
}
return true;
}
</script>

调用此javascript函数以文件上传"onchange"事件....

call this javascript function to fileupload "onchange" event....