protected void Page_Load(object sender, EventArgs e) { if (Session["IsAdminLogin"] == null) { Response.Redirect("Login.aspx"); } SqlDataReader drMember = (SqlDataReader)SqlDataSource_ad.Select(DataSourceSelectArguments.Empty); if (drMember.Read()) { lbladv.Text = "<MARQUEE>" + drMember["跑馬燈"].ToString() + "</MARQUEE>"; } drMember.Close(); }
protected void Page_Load(object sender, EventArgs e) { if (Session["IsMemberLogin"] == null) { PanelMemberLogout.Visible = true; PanelMemberLogin.Visible = false; } else { PanelMemberLogout.Visible = false; PanelMemberLogin.Visible = true; } SqlDataReader drMember = (SqlDataReader)SqlDataSource_ad.Select(DataSourceSelectArguments.Empty); if (drMember.Read()) { lbladv.Text = "<MARQUEE>" + drMember["跑馬燈"].ToString() + "</MARQUEE>"; } drMember.Close(); }