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
mainContainer.Attributes.Add("style", "background-image('myImage.png')");
AND
mainContainer.Attributes.Add("class", "className");
BUT non of these let me change the css of the master file at run time. i am using asp.net using c#
this is the code on the master page
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
ContentPlaceHolder is element wich won’t be existed in output html code. It only defines a region. You can try to change div with class “main”. Just add runat=”server” and id attributes and access from the code.
and then