如何显示文件上传1没有选择文件的RFV消息? [英] how to show the RFV message that file upload 1 have no file chosen ?

查看:87
本文介绍了如何显示文件上传1没有选择文件的RFV消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文件上传控件和按钮点击文件上传按钮



但是如果没有选择文件那么我想给一条消息没有文件选择通过必填字段验证器

PLZ帮助



谢谢。

解决方案

< blockquote> Hi
U可以上传文件数或长度,如果文件长度为零,则当按钮点击事件显示消息时msg



 如果(FileUpload1.FileName.Length =  0 然后 
' 显示错误消息
Else

结束 IF







问候

Aravind


根据您对所需现场验证器的要求:

这个林ks可以帮到你



如何在asp.net中验证FileUpload [ ^ ]

asp上的必需字段验证器:FileUpload控件 [ ^ ]


i have a file upload control and a button on button click file been uploaded

but if there are no file chosen then i want give a message "no file chosen" through required field validater
plz help

thank you.

解决方案

Hi U can get uploaded file count or length,if file length zero,then when button click event show msg

 If (FileUpload1.FileName.Length = 0) Then 
'Show error msg
Else

End IF




Regards
Aravind


As of your requirement of required field validator:
This links may help you

How to validate FileUpload in asp.net [^]
Required field validator on asp:FileUpload control[^]


这篇关于如何显示文件上传1没有选择文件的RFV消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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