adding runat = "server" and id= "MyTag" to the attributes of the HTML element will control the style in the background code by setting the value of the Mytag.style.
For example: On the front page join:
<id= "mydiv" runat= "Server"></Div >
The background can directly refer to the Mydiv to control the image, such as:
Mydiv. style["width""100px";
1.Style Properties
Cascading style sheets (cascading style sheets CSS) CSS uses its rich properties to define the target tag as a variety of styles, such as the ability to define text size, label position, and so on.
" Display:none " "display:none"// effect above one control.style[" Height"200px"// This notation requires that height be a property in the CSS, otherwise the code is invalid.
2.Attributes Properties
The Attributes property is essentially a collection of properties for a server control. This way, you can flexibly set arbitrary attribute values, such as
control.attributes["attribute"]=Value; control.attributes["style""display:none";
ASP. NET uses C # code to set styles or properties in page elements