Wednesday, February 5, 2014

How to wrap up a static html page into ASP.NET MVC Action?

Without layout, it is very easy
public ActionResult PrivacyPolicy()
        {
            //return View();
            return Content(System.IO.File.ReadAllText(Server.MapPath("~/privacypolicy.html")));
        }


With layout
In Controller
public ActionResult PrivacyPolicy()
        {
            return View();
        }
In view file
@Html.Raw(File.ReadAllText(Server.MapPath("~/privacypolicy.html")))

Tuesday, February 4, 2014

What is OR operator in CSS selector?

Comma:

h1, h2, h3 { font-family: sans-serif }

In W3 calls grouping
http://www.w3.org/TR/CSS2/selector.html#grouping