473,396 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to program add BODY Attributes

I want to add BODY Attributes

example:
from <bodyto
<body leftmargin="0" topmargin="0"
or
from <bodyto
<body onload="window_onload()"

how to set the BODY ?

thanks
Jul 25 '07 #1
1 1676
<body runat="server" id="body1">

in c# you can treat the body like other server control.

body1.Attributes.add("name","value");

"jiatiejun" <ji*******@126.comдÈëÏûÏ¢ÐÂÎÅ:ea**************@TK 2MSFTNGP03.phx.gbl...
>I want to add BODY Attributes

example:
from <bodyto
<body leftmargin="0" topmargin="0"
or
from <bodyto
<body onload="window_onload()"

how to set the BODY ?

thanks

Jul 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Frances Del Rio | last post by:
when I test my stuff with the validator in HomeSite it tells me the body tag no longer reads margin attributes.. does this mean now margins are to be specified only in CSS? I work for an...
1
by: Chris Millar | last post by:
wondered if anyone could help me - i'm trying to control the value of an attribute of the BODY tag on a page. So i've got: <html> <body test="colin"> <form ...... ** content ** </form>...
2
by: James Cooke | last post by:
I want to set body attributes programmatically, from the module file: I can go into the .aspx file and say <body onload="myFunc()"> but I don't want to. Like you do with a textbox control: ...
8
by: localhost | last post by:
I would like to wrap all of the HTML inside of my <body> tag inside a <div> with in my code-behind. I do not want to touch the .aspx page template at all. I know how to make the body tag...
3
by: Alan No Spam | last post by:
I am using Visual Studio 2003 and in order not to repeat body tag details in every page <body leftmargin=0 topmargin=0 .... I put those details as an variable in my class: public class...
5
by: mazdotnet | last post by:
Hi, I have a master file with the following setting <body runat="server" id="Body"> and in the .cs I have Body.Attributes.Add("onload", "menuCurrentPage('current','navlist');"); Now in one...
3
by: John Dann | last post by:
Trying to learn Python here, but getting tangled up with variable scope across functions, modules etc and associated problems. Can anyone advise please? Learning project is a GUI-based...
6
by: _Who | last post by:
I use the code below to change to a style sheet that has: body { ....
4
by: _Who | last post by:
In the .master file I have: <body runat="server" id="MainBody"> I need to add a background attribute to MainBody in the .master.vb file. But there it tells me that MainBody is not declared. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.