使用验证控件验证GridView中的DropDownList [英] Validating a DropDownList inside GridView with Validation Controls

查看:74
本文介绍了使用验证控件验证GridView中的DropDownList的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.有人可以告诉我如何通过验证控件而不是JavaScript或jquery验证GridView内部的DropDownList.

Hi to all.Can anyone plz tell me "how to validate a DropDownList which is inside GridView with the help of Validation Controls but not with javascript or jquery.

推荐答案

您好,

U可以像普通验证一样完成验证
Hi,

U can done Validate like Normal Validation
<asp:DropDownList ID="ddlRank" runat="server">
        </asp:DropDownList>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlRank"

            ErrorMessage="Select a Rank"></asp:RequiredFieldValidator>
        <asp:Button ID="btnSave" runat="server" Text="Save" />



希望对您有帮助
祝你好运
快乐编码:)



Hope it will Help u
Best Luck
Happy Coding:)


这篇关于使用验证控件验证GridView中的DropDownList的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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