Tuesday 8 October 2013

Changing the SiteMaster StyleSheet from Codebehind

- In the SiteMaster Page, add ID to StyleSheet tag:
     <link id="layoutStyleSheet" href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
- In a login page, set a SESSION to a value. e.g. SESSION["user"] = "test"
- In the SiteMaster Page_Load method:
     protected void Page_Load(object sender, EventArgs e)
     {
         if (Session["user"] != null)
         {
             if (Session["user"].ToString() == "test")
             {
                 HtmlLink link = Page.Master.FindControl("layoutStyleSheet") as HtmlLink;
                 link.Href = "~/Styles/Aqualinc.css";
             }
             .
             .
             .       
         }
     }

Upgrade Windows 11 Home to Windows 11 Pro

Disable internet connection (Wi-Fi, Internet, etc.) Change the product key using the following Generic product key:                     VK7J...