title: asp,net using site.master page
body: <p>I am trying to change the css class attribute that has been present on the site.master page at run time and I cant really get any head way I have so far tired </p>
  
  <pre><code>mainContainer.Attributes.Add("style", "background-image('myImage.png')");
  </code></pre>
  
  <p>AND </p>
  
  <pre><code>mainContainer.Attributes.Add("class", "className");
  </code></pre>
  
  <p>BUT non of these let me change the css of the master file at run time. i am using asp.net using c#</p>
  
  <p>this is the code on the master page</p>
  
  <pre><code> &lt;div class="main"&gt;
  
              &lt;asp:ContentPlaceHolder ID="MainContent" runat="server"/&gt;
  
  
          &lt;/div&gt;
  </code></pre>