Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7817659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:18:18+00:00 2026-06-02T06:18:18+00:00

Do you guys have an example of bootstrap componentes working on a basic asp.net

  • 0

Do you guys have an example of bootstrap componentes working on a basic asp.net form (with code behind on buttons, getting dropdown selected values and etc)?

I really don’t know how to make it work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:18:20+00:00Added an answer on June 2, 2026 at 6:18 am

    As long as you have an understanding of how ASP.NET server controls render in HTML

    example:

    This server control:

    <asp:Button ID="Button1" runat="server" CssClass="btn" Text="Button 1" />
    

    Renders to this HTML:

    <input type="submit" class="btn" id="Button1" value="Button 1" name="Button1">
    

    then you’re on your way to using bootstrap with ASP.NET webforms

    The CssClass="btn" is all you need to style the button with bootstrap.

    Paste the markup below in your .ASPX page to see an example

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css" />
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:Button ID="Button1" runat="server" CssClass="btn" Text="Button 1" />
        </div>
        </form>
    </body>
    </html>
    

    edit:

    You can turn any standard HTML control into a server control by adding runat="server" and then add click event handlers server side.

    HTML:

    <a id="actionLink" runat="server">Action</a>
    

    Code-Behind:

    protected void Page_Load(object sender, EventArgs e)
    {
        actionLink.ServerClick += new EventHandler(actionLink_ServerClick);
        ...
    }
    
    void actionLink_ServerClick(object sender, EventArgs e)
    {
        ...
    }
    

    Rendered Anchor Tag:

    <a id="actionLink" href="javascript:__doPostBack('actionLink','')">Action</a>
    

    This should get you what you need to implement server clicks on those button dropdown and radio bootstrap controls.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thus far you guys have been wildly helpful with me getting this little ditty
Hi guys i have this line of code in a perl script where i
Hello guys I have 1675 line Code. Want to when user click button textbox.text
Hey guys I have multiple urls with the following format... http://example.org/bloop/why-manage-risk/an/23435-PDF-ENG?N=4294956507&Ntt=why+manage+risk I am trying
Guys I have a best practice question For example I have this classes: class
I'm working on an ASP.NET website in which I'll need to access an usb
I have a serious question for you guys. I am working on a project
do you guys have any idea how to edit the the labels in the
When reading about SQL Injection and XSS i was wondering if you guys have
Python list comprehensions are nice, but near impossible to debug. You guys have any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.