Home > Backend Development > C#.Net Tutorial > .net code example to implement footer effect through master

.net code example to implement footer effect through master

Y2J
Release: 2017-05-11 10:17:38
Original
1239 people have browsed it

This article mainly introduces in detail the effect of asp.net using the master to create the footer. It has a certain reference value. Interested friends can refer to it.

This article shares asp. The specific process of using .net master to create a footer is for your reference. The specific content is as follows

1. The master creation process is skipped.

2. Create master page css: Site.css

body {
}
.linkButton{
 text-decoration:none;
 color:whitesmoke;
}
Copy after login

3. Add a footer to the master page.

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 <title></title>
 <asp:ContentPlaceHolder ID="head" runat="server">
 </asp:ContentPlaceHolder>
   <!-- 引用指定css文件 -->
 <link href="Css/Site.css" rel="external nofollow" rel="stylesheet" type="text/css"/>
</head>
<body>
 <form id="form1" runat="server">
 <p>
  <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
  
  </asp:ContentPlaceHolder>
 </p>
 <hr />
 <!-- 页脚标签:footer -->
 <footer>
  <p style="background-color: #2A3A56; line-height: 100px; text-decoration:none">

   <p style="text-align:center" >
    <asp:HyperLink class="linkButton" ID="AboutUs" Text="关于我们|" runat="server"/>
    <asp:HyperLink class="linkButton" ID="ConnectUs" Text="联系我们|" runat="server"/>
    <asp:HyperLink class="linkButton" ID="Statement1" Text="网站声明|" NavigateUrl="~/Admin/Statement.aspx" runat="server"/>
    <asp:HyperLink class="linkButton" ID="Statement2" Text="法律声明" NavigateUrl="~/Admin/Statement.aspx" runat="server" />
   </p>
  </p>

 </footer>
  
 </form>
</body>
</html>
Copy after login

4. Create the Default.aspx page and HyperLink related connection interface.

5. The test results are as follows.

##[Related recommendations]

1.

ASP.NET Free Video Tutorial

2.

ASP.NET Tutorial

3.

Geek Academy ASP.NET Video Tutorial

The above is the detailed content of .net code example to implement footer effect through master. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template