첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

TestProject.zip
다운로드

▶ NavigatorUserControl.ascx

<%@ Control Language="C#" AutoEventWireup="true" 
    CodeBehind="NavigatorUserControl.ascx.cs" 
    Inherits="TestProject.NavigatorUserControl" %>
<div class="text-center">
내비게이터
</div>

 

728x90

 

▶ CategoryUserControl.ascx

<%@ Control Language="C#" AutoEventWireup="true" 
    CodeBehind="CategoryUserControl.ascx.cs" 
    Inherits="TestProject.CategoryUserControl" %>
<div class="text-center">
카테고리
</div>

 

300x250

 

▶ CatalogUserControl.ascx

<%@ Control Language="C#" AutoEventWireup="true" 
    CodeBehind="CatalogUserControl.ascx.cs" 
    Inherits="TestProject.CatalogUserControl" %>
<div class="text-center">
카탈로그
</div>

 

▶ CopyrightUserControl.ascx

<%@ Control Language="C#" AutoEventWireup="true" 
    CodeBehind="CopyrightUserControl.ascx.cs" 
    Inherits="TestProject.CopyrightUserControl" %>
<div class="text-center">
저작권
</div>

 

▶ MainPage.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainPage.aspx.cs" Inherits="TestProject.MainPage" %>
<%@ Register TagPrefix="local" TagName="NavigatorUserControl" Src="~/NavigatorUserControl.ascx" %>
<%@ Register TagPrefix="local" TagName="CategoryUserControl"  Src="~/CategoryUserControl.ascx"  %>
<%@ Register TagPrefix="local" TagName="CatalogUserControl"   Src="~/CatalogUserControl.ascx"   %>
<%@ Register TagPrefix="local" TagName="CopyrightUserControl" Src="~/CopyrightUserControl.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>UserControl 클래스 : 웹 사이트 뼈대 만들기</title>
        <link href="Content/bootstrap.css" rel="stylesheet" />
        <style>
            div
            {
                border  : 1px solid red;
                padding : 10px;
            }
        </style>
    </head>
    <body>
        <form id="form" runat="server">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <local:NavigatorUserControl ID="navigatorUserControl" runat="server" />
                    </div>
                </div>
                <div class="row" style="height: 200px;">
                    <div class="col-md-3">
                        <local:CategoryUserControl ID="categoryUserControl" runat="server" />
                    </div>
                    <div class="col-md-9">
                        <local:CatalogUserControl ID="catalogUserControl" runat="server" />
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <local:CopyrightUserControl ID="copyrightUserControl" runat="server" />
                    </div>
                </div>
            </div>
        </form>
    </body>
</html>

 

▶ MainPage.aspx.cs

using System;
using System.Web.UI;

namespace TestProject
{
    /// <summary>
    /// 메인 페이지
    /// </summary>
    public partial class MainPage : Page
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Method
        ////////////////////////////////////////////////////////////////////////////////////////// Protected

        #region 페이지 로드시 처리하기 - Page_Load(sender, e)

        /// <summary>
        /// 페이지 로드시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        #endregion
    }
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요