Yes, add runat="server". Also, give the body tag a unique id and then you
can refer it in the code-behind as
HtmlGenericControl myBodyTag.
And yes, you can add attributes in the Page_Load.
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin http://usableasp.net
"Mufasa" <jb@nowhere.comwrote in message
news:u5**************@TK2MSFTNGP05.phx.gbl...
How do I set the attribute on the body tag?
Do I put a runat="server" and then add the attributes in the Page_Load
routine?
J.
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:OS**************@TK2MSFTNGP06.phx.gbl...
>Move the <bodyto the master page outside the div. You can always set up
the <body>'s attributes from the content page. Is it what you are after?
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Mufasa" <jb@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>>>I have a master page with stuff in it. It includes the body tag and then
the asp:content tag. I want to hide some text when the page is loaded but
is made visible by a check box. All that code works fine. I have the text
in a <divthat I hide/unhide when a checkbox is clicked and it's all
done at the client level.
Problem is, to hide the text I need to call a javascript function on
load. The only place it seems to work is in the <bodycommand. But if I
do that, I get a warning about having a <bodycommand within a <div>
command (the div is part of my master page.)
Anyway around this? I would like to leave the stuff at the client side
so it responds immediately without a postback to the server.
TIA - Jeff.