Files
17168ERP/web/admin/Templates/TBS5ADM001/MasterPage.master.cs
2025-08-29 01:27:25 +08:00

34 lines
985 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class admin_Templates_TBS5ADM001_MasterPage : MyWeb.master
{
protected void Page_Load(object sender, EventArgs e)
{
MasterLoad();
}
public void set_navs(bool visible=true, string body_class="")
{
this.nav.Visible = visible;
this.layoutSidenav_nav.Visible = visible;
this.PageBody.Attributes["class"] += " "+ body_class;
}
/* From MyWeb.config*/
public static bool IsHttps()
{
return HttpContext.Current.Request.IsSecureConnection;
}
public static string UrlHost()
{
string url = (IsHttps() ? "https://" : "http://")
//+ HttpContext.Current.Request.Url.Host
+ HttpContext.Current.Request.ServerVariables["HTTP_HOST"]
+ VirtualPathUtility.ToAbsolute("~/");
return url;
}
}