title: How to modify the style of asp.net page that use asp:Content?
body: <p>I have asp.net page like this:</p>
  
  <p><strong>Default.aspx:</strong><br/></p>
  
  <pre><code>&lt;%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
  CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;
  
  &lt;asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"&gt;&lt;/asp:Content&gt;
  
  &lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt;
  
       ...
  
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p><strong>Default.aspx.cs:</strong><br/></p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e) {
      BodyContent.Style["background-color"] = "Red";  // #1 This code doesn't work
  }
  </code></pre>
  
  <p>I want to modify the background color of the page. I put the code above (#1) and it doesn't work.</p>
  
  <p>So, how to modify the background color of the page?</p>