如何要求字段验证不在asp.net 4.0中选择dropdownlist的值 [英] how to require field validation not select value of dropdownlist in asp.net 4.0

查看:35
本文介绍了如何要求字段验证不在asp.net 4.0中选择dropdownlist的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何要求字段验证未在asp.net 4.0中选择dropdownlist的值?

how to require field validation not select value of dropdownlist in asp.net 4.0?

推荐答案

根据我的理解,您想验证值是否为在下拉列表中选择.在这种情况下,您可以使用 RequiredFieldValidator [ ^ ].如果您只是搜索,有很多示例.以下是我发现有用的一些内容.

http://forums.asp.net/t/1296491.aspx/1 [ ^ ]
http://stackoverflow.com/questions/5310609/dropdownlist- validate-in-asp-net-using-required-field-validator [ http://asp-net-example.blogspot.com/2008/10/dropdownlist-example-how-to-validate.html [
From what I understand, you want to validate if a value has been selected on the Dropdownlist. In that case, you can use a RequiredFieldValidator[^]. There are plenty of examples if you just search. Here are just few of those I found useful.

http://forums.asp.net/t/1296491.aspx/1[^]
http://stackoverflow.com/questions/5310609/dropdownlist-validation-in-asp-net-using-required-field-validator[^]
http://asp-net-example.blogspot.com/2008/10/dropdownlist-example-how-to-validate.html[^]


这可能对您有帮助
http://www.dreamincode.net/forums/topic/153597-requiredfieldvalidator-wont -validate-dropdownlist/ [ ^ ]

http://www.java2s.com/Tutorial/ASP.NET/0160__Validation/ValidatingDropDownListswithRequiredFieldValidatorControl.htm [ ^ ]
This may help you
http://www.dreamincode.net/forums/topic/153597-requiredfieldvalidator-wont-validate-dropdownlist/[^]

http://www.java2s.com/Tutorial/ASP.NET/0160__Validation/ValidatingDropDownListswiththeRequiredFieldValidatorControl.htm[^]


这篇关于如何要求字段验证不在asp.net 4.0中选择dropdownlist的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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