masterpage.master.cs

来自「小区物业管理系统源代码,密码:123456,」· CS 代码 · 共 68 行

CS
68
字号
//文件名:MasterPage.master.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {//设置网站页头或页尾的信息
        if (!IsPostBack)
        {
            if (Session["MyUserName"] != null)
            {
                this.Label3.Text = Session["MyUserName"].ToString();
            }
            else
            {
                this.Label3.Text = "";
            }
            if (Session["MySystemName"] != null)
            {
                this.HyperLink1.Text = Session["MySystemName"].ToString();
            }
            else
            {
                this.HyperLink1.Text = "";
            }
            if (Session["MyCommunityWebSite"] != null)
            {
                this.HyperLink1.NavigateUrl = Session["MyCommunityWebSite"].ToString();
            }
            else
            {
                this.HyperLink1.NavigateUrl = "";
            }
            string MyCommunityName = "";
            if (Session["MyCommunityName"] != null)
            {
                MyCommunityName = Session["MyCommunityName"].ToString();
            }
            string MyCommunityAddress = "";
            if (Session["MyCommunityAddress"] != null)
            {
                MyCommunityAddress = Session["MyCommunityAddress"].ToString();
            }
            string MyCommunityPhone = "";
            if (Session["MyCommunityPhone"] != null)
            {
                MyCommunityPhone = Session["MyCommunityPhone"].ToString();
            }
            string MyCommunityLogo = "";
            if (Session["MyCommunityLogo"] != null)
            {
                MyCommunityLogo = "~/Images/" + Session["MyCommunityLogo"].ToString();
            }
            this.Image1.ImageUrl = MyCommunityLogo;
            this.Label1.Text = "版权所有(2007-2010):" + MyCommunityName + " " + MyCommunityAddress + " " + MyCommunityPhone;
        }
    }
}

⌨️ 快捷键说明

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