Is there a way that i can bind bootstrap onto asp controls?
Bootstrap button :
<button type="button" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-cog"></span></button>
Asp.net button:
<asp:Button ID="Button1" runat="server" Text="Button" class="btn btn-default btn-lg"/>//How i add the span class? or is there a work around?
If this is not possible, is there a way that the html button can trigger of .net eventfunction?
protected void Button1_Click(object sender, EventArgs e)
{
//Do something.
}
I've tried adding onclick ="Button1_Click" on the html, it does not work.
Since Bootstrap is all HTML, CSS and JavaScript, all open standards, you can use it with any framework including ASP.NET MVC. When you start a new MVC project, Bootstrap will be present, meaning you'll find Bootstrap. css and Bootstrap. js in your project.
Bootstrap is a popular web framework which is used to create responsive web application that can run even on the mobile device. It provides HTML, CSS and JavaScript libraries to build applications. ASP.NET MVC, by default supports Bootstrap and use it's libraries to create frontend of the application.
You can use the <asp:LinkButton>
to add your icon to the button. e.g.
<asp:LinkButton ID="CogLinkButton" CssClass="btn btn-default btn-lg" runat="server" OnClick="CogLinkButton_Click"><span class="glyphicon glyphicon-cog"></span></asp:LinkButton>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With