需要有关asp.net验证控件的帮助!弹出窗口中显示验证消息? [英] Need help regarding asp.net validation controls! display validation message in popover?

查看:75
本文介绍了需要有关asp.net验证控件的帮助!弹出窗口中显示验证消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

How can I display validation messages inside the textbox Or through bootstrap popover Or is there any other better way to display Validation messages without disturbing layout. ????
Note: Using Asp Validation Control and I don't want to use validation summary control.





我的尝试:



我试过这个

< form id =form1runat =server>



What I have tried:

I have tried this
<form id="form1" runat="server">



< asp :TextBox ID =txtNameCausesValidation =truerunat =server>



< asp:RequiredFieldValidator ID =RequiredFieldValidator1

runat =serverErrorMessage =

ControlToValidate =txtNameCssClass =Display =Dynamic

title =可容许的popover数据 - toggle =popoverdata-trigger =focus

data-content =点击文档中的任意位置以关闭此弹出窗口>





< input id =btnSubmittype =buttonvalue =Submit/>


<asp:TextBox ID="txtName" CausesValidation="true" runat="server">

<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ErrorMessage=""
ControlToValidate="txtName" CssClass="" Display="Dynamic"
title="Dismissible popover" data-toggle="popover" data-trigger="focus"
data-content="Click anywhere in the document to close this popover">


<input id="btnSubmit" type="button" value="Submit" />



< / form>



< script>

$(function() {

$([data-toggle ='popover'])。popover();

});

< /脚本>


</form>

<script>
$(function () {
$("[data-toggle = 'popover']").popover();
});
</script>

推荐答案

(function(){
(function () {


([data-toggle ='popover'] ).popover();

});

< / script>
("[data-toggle = 'popover']").popover();
});
</script>


你应该检查一下 - 很酷的方式显示验证错误消息



http:/ /asp.net-tutorials.com/validation/required-field-validator/ [ ^ ]
you should check this - Cool way to display validation error message

http://asp.net-tutorials.com/validation/required-field-validator/[^]


这篇关于需要有关asp.net验证控件的帮助!弹出窗口中显示验证消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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