Changing bgcolor of Page/Master Page dynamically+ASP.NET
Hi, one of my colleague was struggling that how to set value of Page’s background color in ASP.NET Code??
Actually we want to set a page’s background color on Page_Load. and value changes everytime..how can i achieve it?
Nothing magic in it just two lines will do the same:
HtmlGenericControl bodytag = (HtmlGenericControl)Page.Master.FindControl(“body”);
for it my Master Page has body tag declared like this:
<body ID=”body” runat=”server”/>