twitter-bootstrap 带有 asp.net 文本框的引导输入组件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20114090/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 19:16:45  来源:igfitidea点击:

bootstrap input component with asp.net textbox

c#asp.nettwitter-bootstrap

提问by aravind

I want to use twitter bootstrap input component for a textbox which is present here. How could I use it with my ASP.Net text box?

我想将 twitter bootstrap 输入组件用于此处存在的文本框。我如何将它与我的 ASP.Net 文本框一起使用?

Actual code:

实际代码:

<div class="input-group">
  <span class="input-group-addon">@</span>
  <input type="text" class="form-control" placeholder="Username">
</div>

I have tried the following:

我尝试了以下方法:

<div class="input-group">
    <asp:TextBox ID="text" Text="<span class=\"input-group-addon\">@</span>" runat="server" CssClass="form-control">

    </asp:TextBox>
</div>

回答by L_J_ribar

I've been using this type of code with no problems:

我一直在使用这种类型的代码,没有任何问题:

<div class="input-group">
  <span class="input-group-addon">@</span>
  <asp:TextBox ID="text" runat="server" CssClass="form-control" placeholder="Username">
  </asp:Textbox>
</div>