Hi Glenn,
Thank you for posting.
As for the programmatically change ASP.NET webform page's background color
question, I think we can mark the <body> element in the form as
runat="server", then we can use code to manipulate the <body> element's
style attributes in page's code behind. Also, are you using ASP.NET 1.1 or
2.0, for asp.net 1.1 since it is not using the partial class to compile
aspx and code behind, we still need to manually declare the control member
in the codebehind page class(if we mark the <body> as runat="server").
Below is the code we need to modify in ASP.NET 2.0 page to programmatically
change the page's background:
for ASP.NET 2.0
=========in aspx ========
<body id="mybody" runat="server">
=======in codebehind=====
protected void Page_Load(object sender, EventArgs e)
{
mybody.Style[HtmlTextWriterStyle.BackgroundColor] = "#787878";
}
Hope this helps.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)