CitySunlight/CitySunlight/Basic.Master.cs

32 lines
1.0 KiB
C#
Raw Normal View History

2015-06-19 06:09:07 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace CitySunlight
{
public partial class Basic : System.Web.UI.MasterPage
{
2015-06-23 08:40:30 +00:00
public String msg;
2015-06-19 06:09:07 +00:00
protected void Page_Load(object sender, EventArgs e)
{
}
public String GetLoginInfo()
{
String html = "";
if (Session["username"] == null)
2015-06-19 09:22:35 +00:00
html = "<li><a href=\"/Account/Login.aspx\" >登录</a></li>";
2015-06-19 06:09:07 +00:00
else
{
2015-06-23 07:28:58 +00:00
html = String.Format("<li><a href=\"#\" >欢迎您 {0} </a></li>", Session["username"].ToString());
2015-06-19 10:56:48 +00:00
html += "<li><a href=\"/Account/LogOut.aspx\" >注销</a></li>";
2015-06-19 09:22:35 +00:00
html += "<li><a href=\"/Product/ProductEdit.aspx?type=create\" >发布</a></li>";
html += "<li><a href=\"/Admin.aspx\" >管理</a></li>";
2015-06-19 06:09:07 +00:00
}
return html;
}
}
}