如何创建简单登录的母版页 [英] how to create master page for simple login

查看:78
本文介绍了如何创建简单登录的母版页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为简单登录应用程序创建母版页。我们可以为应用程序的所有页面保留母版页。请提供anu链接。

how to create a master page for simple login application. can we maitain the master page for all the pages that application. please provide anu links.

推荐答案

http://forums.aspfree.com/net-development-11/master-page-login-control-163011.html [ ^ ]



ASP页

http://forums.aspfree.com/net-development-11/master-page-login-control-163011.html[^]

ASP page
<%@ Page Language="C#" masterpagefile="master.master" title="Login" %>

<asp:Content id="Content4" runat="server" contentplaceholderid="head">
</asp:Content>

<asp:Content id="Content5" runat="server" contentplaceholderid="PageDesc">
    <h5>Login</h5>
</asp:Content>

<asp:Content id="Content6" runat="server" contentplaceholderid="sidebar">
    <h4>Contact Information</h4>
</asp:Content>

<asp:Content id="Content1" runat="server" contentplaceholderid="Body">
    <asp:Login runat="server" id="Login1">
    </asp:Login>
</asp:Content>









web配置文件





web config file

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.web>
        <authentication mode="Forms" />
        <authorization>
            <deny users="?" />
        </authorization>
        <identity impersonate="False" />
    </system.web>
</configuration>







主页






master page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Master Language="C#" %>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title></title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

<body style="margin-top: 0; margin-bottom: 0">

<form id="form1" runat="server">

<div class="wrapper">
    <div style="text-align: center">
            <a href="http://www.123.xxx">
            <img alt="Link to Home Page" src="images/123header.jpg" width="625" height="71" /></a></div>
    <table cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td class="header" style="width: 750px; height: 219px">
            <!--#include file="includes/include_sitename.htm"-->
            <asp:ContentPlaceHolder id="PageDesc" runat="server">
            <h5>&nbsp;</h5>
            </asp:ContentPlaceHolder>
            </td>
        </tr>
        <tr>
            <td class="navigation">
            <!--#include file="includes/include_mainnavigation.htm"--></td>
        </tr>
        <tr>
            <td>
            <table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
                <tr>
                    <td class="sidebar">
                    <asp:ContentPlaceHolder id="sidebar" runat="server">
                        <p>&nbsp;</p>
                        </asp:ContentPlaceHolder>
                    </td>
                    <td class="maintext" valign="top">
                    <asp:ContentPlaceHolder runat="server" id="Body">

                    </asp:ContentPlaceHolder>
                    </td>
                </tr>
            </table>
            </td>
        </tr>
        <tr>
            <td class="footer">
            <!--#include file="includes/include_footer.htm"--></td>
        </tr>
    </table>
</div>

</form>

</body>

</html>


这篇关于如何创建简单登录的母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆