ASP.net基础编程2—母版嵌套
来源:互联网 发布:石狮淘宝培训中心 编辑:程序博客网 时间:2024/06/07 07:18
开发环境:vs2012
注:子内容页所需的style样式和using引入包 需要加入母板中
shopdata_MasterPage.master
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="shopdata_MasterPage.master.cs" Inherits="shopdata_MasterPage" %><!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>shopdata模版页</title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> <style type="text/css"> .auto-style1 { width: 100%; border-style: solid; border-width: 0px; align-content: center; } .auto-style4 { height: 20px; width: 127px; } .auto-style5 { width: 127px; } .auto-style6 { height: 20px; width: 124px; } .auto-style7 { width: 124px; } .auto-style8 { width: 124px; height: 23px; } .auto-style9 { width: 127px; height: 23px; } .foot { width: 100%; background-color: gray; color: white; text-align: center; bottom: 10px; } .content { float: none; height:900px; } </style></head><body> <form id="form1" runat="server"> <div class ="auto-style1"> <div class="img_head"> <asp:Image ID="headImg" runat="server" imageUrl="images/head.jpg" /> </div> <div> <asp:Menu ID="menu" runat="server" Orientation="Horizontal" Height="28px" Width="100%"> <Items> <asp:MenuItem NavigateUrl="~/default.aspx" Text="首页" Value="首页"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/login.aspx" Text="登录" Value="登录"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/register.aspx" Text="注册" Value="注册"></asp:MenuItem> <asp:MenuItem Text="浏览" Value="浏览"> <asp:MenuItem NavigateUrl="~/showGuest.aspx" Text="客户信息" Value="客户信息"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/showProduct.aspx" Text="分类商品信息" Value="分类商品信息"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/showAllProduct_dataList.aspx" Text="全部商品" Value="全部商品"></asp:MenuItem> </asp:MenuItem> </Items> </asp:Menu> </div> <div class="content"> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> <div class="foot">Copyright@2017, CCIT, All Rights Reserved</div> </div> </form></body></html>default.aspx
<%@ Page Title="首页" Language="C#" MasterPageFile="~/shopdata_MasterPage.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="home" %><asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <%-- 子内容页开始 --%> <br /> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/login.aspx">点击登陆</asp:HyperLink> <br /> <%-- 子内容页结束 --%> </asp:Content>
阅读全文
1 0
- ASP.net基础编程2—母版嵌套
- 嵌套的 ASP.NET 母版页
- C# asp.net 母版页嵌套
- 嵌套的 ASP.NET 母版页
- Asp.net母版页编程
- asp.net基础复习(二)——母版页
- ASP.net基础(七) 母版页
- ASP.NET MVC3.0 中 Razor 母版嵌套
- ASP.NET的母版
- ASP.NET 母版
- asp.net 母版页
- asp.net---母版页
- asp.net 母版页
- ASP.net 母版页
- 以编程方式使用 ASP.NET 母版页
- 以编程方式使用 ASP.NET 母版页
- 在ASP.NET中以编程方式设置母版页
- ASP.NET 嵌套母版页中找不到控件问题(未已用到对象错误)
- python的反射
- Notification详解(二)
- System.Threading.Thread类方法
- ROS bookmarks
- Bzoj2326:HNOI2011-数学作业
- ASP.net基础编程2—母版嵌套
- git温习之----仓库与分支的理解
- Android Studio 中Couldn't resolve resource
- BZOJ 3175: [Tjoi2013]攻击装置 二分图最大独立集
- 如何快速转载CSDN中的博客
- 客户端与服务端的sessionId的区别
- hbase参数配置优化
- 最长回文子串
- android ethernet