2013-04-30 65 views
0

Twitter的引導提示我有工作,但每當有Twitter的引導工具提示 - ASP.NET Web窗體 - 不工作

<asp:RequiredFieldValidator ID="rfvAmount" 
          runat="server" 
          ControlToValidate="txtAmount" 
          ErrorMessage="This is a required field."> 
</asp:RequiredFieldValidator> 

頁面上,工具提示不起作用。

如果我註釋掉驗證器,工具提示工作。思考?

這裏是表單驗證的工具提示。

<asp:TextBox ID="txtAmount" runat="server" ValidationGroup="rfvAmount"> 
</asp:TextBox> 

<asp:RequiredFieldValidator ID="rfvAmount" runat="server"  
ControlToValidate="txtAmount" ErrorMessage="This is a required field.">  
</asp:RequiredFieldValidator> 

<asp:Button ID="btnSend" runat="server" Text="Send" class="btn btn-success" data- 
placement="right" rel="tooltip" data-original-title="Send Info"/> 
+2

請顯示你的工作? – 2013-04-30 17:43:44

+0

當你下載了boostrap你包含了所有的jquery插件?請將代碼放在所謂的工具提示 – 2013-04-30 17:48:19

+0

嘗試添加驗證組到您的驗證器 – 2013-04-30 17:49:45

回答

0

我有與ASP.NET驗證器相同的問題。要解決此衝突,請在頁面底部放置Bootstrap引用。這樣它將在ASP.NET控件加載後加載。

<!DOCTYPE html> 
<html> 
<head> 
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script> 
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet"> 
</head> 
<body> 
<div class="container"> 
    <%--your ASP.NET validators will load here--%> 


</div> 
<script type="text/javascript" src="//netdna.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> 
<script> 


    $(document).ready(function(){ 
      doYourStaff(); 
    }); 


</script> 
</body> 
</html>