开发者

How to trigger Required Field Validator

In Aspnet, how to trigger RequiredFiel开发者_如何学JAVAdValidator when a textbox is clicked?


<asp:TextBox ID="TextBox1" runat="server" onclick="javascript:trig();"></asp:TextBox>

javascript function

 function trig() {
        ValidatorEnable(document.getElementById('<%= ValidatorID.ClientID %>'), true);
    }


In ajax control toolkit, there is a control called validator callout that will help you to do this, link here http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ValidatorCallout/ValidatorCallout.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜