简体   繁体   中英

How to use Bootstrap in aspx page?

I have this aspx page:

<%@ Page Title="Home" Language="C#" MasterPageFile="~/Store.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:content id="Content1" contentplaceholderid="head" runat="Server">
</asp:content>
<asp:content id="Content2" contentplaceholderid="StoreMasterPlaceHolder" runat="Server">
    <table>
        <tr>
            <td class="tblBodySides">
                <div class="bodyDiv">
                    <!-- left Column -->
                    <table>
                        <tr>
                            <td class="tblBodySides">
                                <h4>
                                    look at our fantastic events
                                    <br />
                                    book one for today !
                                    <br />
                                    <hr />
                                </h4>
                                <h3>
                                    Events</h3>
                                <asp:calendar runat="server" class="cal" />
                            </td>
                            <td>
                            </td>
                            <td class="tblBodySides left_bord">
                                <h3>
                                    Here Are list of our Items colors:</h3>
                                <asp:gridview runat="server" id="gw1" datasourceid="XmlDataSource1">
                                </asp:gridview>
                                <asp:xmldatasource id="XmlDataSource1" runat="server" datafile="~/App_Data/items.xml">
                                </asp:xmldatasource>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td class="tblBodyCenter">
            </td>
            <td class="tblBodySides">
                <div class="bodyDiv">
                    <!-- Right Column -->
                    <table>
                        <tr>
                            <td class="sides">
                            </td>
                            <td>
                                <h3>
                                    Definitions:
                                    <br />
                                    <hr />
                                </h3>
                                <ul>
                                    <li>
                                        <h2>
                                            CSS
                                        </h2>
                                    </li>
                                    <p class="justified left_bord">
                                    BLA BLA BLA</p>
                                   <br />
                                </ul>
                            </td>

                            <td class="sides">

                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</asp:content>

I want to use bootstrap in a page above.

Where do I put this rows in above:

  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

Inside this section:

 <asp:content id="Content1" contentplaceholderid="head" runat="Server">
 </asp:content>

Because this is the content area for content that should be placed in the head section of your resulting HTML page. That's why the id is 'head'.

如果您使用的是母版页,则请在母版页中将链接代码写入样式表,此后,我们不想为每个页面使用链接代码,只需使用该母版页即可。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM