2016-03-09 98 views
0

我有這個aspx頁面:如何在aspx頁面中使用Bootstrap?

<%@ 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> 

我想在一個頁面中使用自舉上面。

我應該把這個列在上面:

<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> 

回答

1

這裏面部分:

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

因爲這是內容的內容區域應放置在您造成的頭部HTML頁面。這就是爲什麼ID是'頭'。

0

如果您正在使用母版頁,請將鏈接代碼寫入母版頁中的樣式表,在此之後,我們不想使用每個頁面的鏈接代碼只使用母版頁。