zoukankan      html  css  js  c++  java
  • 1 asp.net 中如何把用户控件应用于母版页

    1 创建用户控件

    2 在母版页中注册用户控件

    3 使用

    <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Store.master.cs" Inherits="SportsStore.Pages.Store" %>
    
    <%@ Register TagPrefix="SS" TagName="CatLinks" Src="~/Controls/CategoryList.ascx" %>
    <!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>SportsStore</title>
        <link rel="stylesheet" href="../Content/Style.css" />
    </head>
    <body>
        <form id="form1" runat="server">
            <div id="header">
                <div class="title">SPORTS STORE</div>
            </div>
            <div id="categories">
                <SS:CatLinks runat="server" />
            </div>
            <div>
                <asp:ContentPlaceHolder ID="bodyContent" runat="server">
                </asp:ContentPlaceHolder>
            </div>
        </form>
    </body>
    </html>
  • 相关阅读:
    集合
    16
    最常使用Eclipse快捷键
    Java小菜的进阶之路(异常捕获与处理(一))
    0803作业
    0801作业
    java中this与super的见解
    7.27作业
    7.23作业
    java内部类的浅谈(错误之处还请见谅!)
  • 原文地址:https://www.cnblogs.com/mibing/p/7435688.html
Copyright © 2011-2022 走看看