webadminbuttonrow.master

来自「《圣殿祭司的ASP.NET 2.0开发详解——使用C#》光盘内容.包含了书籍所含」· MASTER 代码 · 共 60 行

MASTER
60
字号
<%@ Master masterPageFile="WebAdmin.master" className="WebAdminButtonRowMasterPage" %>
<%@ MasterType virtualPath="WebAdmin.master" %>

<script runat="server" language="cs">

private string _directionality;

public string Directionality {
    get {
        if (String.IsNullOrEmpty(_directionality)) {
            _directionality = ((string) GetGlobalResourceObject("GlobalResources", "HtmlDirectionality")).ToLower();
        }
        return _directionality;
    }
}

public void Page_Load() {
    string htmlText = "<td><img src=\"" + Request.ApplicationPath + "/images/yellowCORNER.gif\" width=\"34\"";
    htmlText = htmlText + " alt=\"" + (string)GetGlobalResourceObject("GlobalResources", "YellowCornerGif") + "\"";
    htmlText = htmlText + " border=\"0\"/></td>";
    if (Directionality == "rtl") {
        yellowCornerElement.Text = "";
        yellowCornerElementBIDI.Text = htmlText;
    } else {
        yellowCornerElement.Text = htmlText;
        yellowCornerElementBIDI.Text = "";
    }
}

public void SetNavigationBarSelectedIndex(int sel) {
    Master.SetNavigationBarSelectedIndex(sel);
}

public void SetNavigationBarVisibility(bool visible) {
    Master.SetNavigationBarVisibility(visible);
}

</script>

<asp:content runat="server" contentplaceholderid="titleBar">
    <asp:contentplaceholder runat="server" id="titleBar"/>
</asp:content>
<asp:content runat="server" contentplaceholderid="content">
    <asp:contentplaceholder runat="server" id="content"/>
</asp:content>

<asp:content runat="server" contentplaceholderid="buttonRow">
<table align="right" valign="bottom" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <asp:literal runat="server" id="yellowCornerElement"/>
        <td class="buttonCell" align="left" valign="middle">
            <asp:literal runat="server" id="arrowElement" />
            &nbsp;&nbsp;
            <asp:contentPlaceHolder runat="server" id="buttons"/>
        </td>
        <asp:literal runat="server" id="yellowCornerElementBIDI"/>
    </tr>
</table>
</asp:content>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?