Re: Changing page bgcolor from code (repost)
- From: "GaryDean" <GaryDean@xxxxxxxxxxxxxxxxx>
- Date: Sat, 11 Mar 2006 14:55:30 -0800
Yes I REALLY want to set it at run time - please trust me on this. Not at
design time.
The reason why I don't simply set it in the body is because I want to set it
at run time.
your examples show it working but I can't see your code behind.
Maybe we are not communicating well. I want to find out how to set the
background color at run time from my code behind file.
--
Regards,
Gary Blakely
"Juan T. Llibre" <nomailreplies@xxxxxxxxxxx> wrote in message
news:OgkcqfVRGHA.1160@xxxxxxxxxxxxxxxxxxxxxxx
If that's all you want to do, why don't you simply do it,
by setting the <body background-color...> attribute ?
You aren't *really* attemptiong to change the background color
from code. You are just setting an arbitrary background color.
If that's all you want to do, why don't you just set it in the <body...>
Otherwise, use the code for the examples I posted.
Those samples allow users to select any background/foreground colors you
want to allow.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"GaryDean" <GaryDean@xxxxxxxxxxxxxxxxx> wrote in message
news:eXgJiXVRGHA.4792@xxxxxxxxxxxxxxxxxxxxxxx
In the original post I failed so indicate that I am using framework
1.1.......
I need to be able to change the background color of a page from code. I
found an answer to this question in another forum from Peter Huang that
said
that an id="bg" as follows...
<body MS_POSITIONING="GridLayout" runat="server" id="bg">
then we could do the following in our codebehind file....
Private Sub Page_Load(sender As Object, e As System.EventArgs)
bg.Attributes.Add("BgColor", "#ff9933")
End Sub
However, I get the errror that bg is Private.
Is there a solution to this issue where bgcolor, and other attributes of
the
document can be changed from codebehind code?
--
Regards,
Gary Blakely
.
- Follow-Ups:
- Re: Changing page bgcolor from code (repost)
- From: Juan T. Llibre
- Re: Changing page bgcolor from code (repost)
- References:
- Changing page bgcolor from code (repost)
- From: GaryDean
- Re: Changing page bgcolor from code (repost)
- From: Juan T. Llibre
- Changing page bgcolor from code (repost)
- Prev by Date: asp:Label rendering as <span> in IE :(
- Next by Date: Asp.net 2.0
- Previous by thread: Re: Changing page bgcolor from code (repost)
- Next by thread: Re: Changing page bgcolor from code (repost)
- Index(es):
Relevant Pages
|
Loading