Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | None | 0 0
  1.  @{
  2.  
  3.         if (User.Identity.IsAuthenticated)
  4.         {
  5.             string theme = "";
  6.             if (Request.Cookies["theme"] != null)
  7.             {
  8.                 theme = Request.Cookies["theme"].Value.ToString();
  9.             }
  10.  
  11.             if (theme == "Cyborg")
  12.             {
  13.                 <link rel="stylesheet" href="~/Content/bootstrap-cyborg.css" />
  14.             }
  15.             else if (theme == "Sandstone")
  16.             {
  17.                 <link rel="stylesheet" href="~/Content/bootstrap-sandstone.css" />
  18.             }
  19.             else if (theme == "Simplex")
  20.             {
  21.                 <link rel="stylesheet" href="~/Content/bootstrap-simplex.css" />
  22.             }
  23.             else
  24.             {
  25.                 <link rel="stylesheet" href="~/Content/bootstrap.css" />
  26.             }
  27.         }
  28.         else
  29.         {
  30.             <link rel="stylesheet" href="~/Content/bootstrap.css" />
  31.         }
  32.     }
  33.     @Styles.Render("~/Content/css")
  34.     @Scripts.Render("~/bundles/modernizr")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement