E-Tip
 2011.10.03
 2011.10.10
 2011.10.17
 2011.10.24
 2011.10.31
 2011.11.07
 2011.11.21
 2011.11.28
 2011.12.05
 2011.12.19
 2011.12.26
â–¶view 2012

Use the Visual Studio .NET Toolbox to add <div> elements to Web pages (ASP.NET)

If you need to add <div> elements to your ASP.NET Web pages, Visual Studio .NET makes it easy for you to do so on your ASPX design page. Simply open the VS .NET Toolbox and expand the HTML menu. Then, you can either select Grid Layout Panel or Flow Layout Panel from the list and draw it on your Web form. In ASP.NET you can configure pages for Grid Layout (using X and Y coordinates) or Flow Layout (left to right, top to bottom). If you configure your page for Grid Layout, use the Flow Layout Panel to add a section that supports a flow layout. Likewise, if you configure your page for Flow Layout, use the Grid Layout panel to add a section that supports a grid layout.


Create reusable attribute groups in your XML DTD
In XML DTDs, you can set up reusable attribute groups for common attributes by creating a parameter entity and referencing it in an attribute list. For example, you can set up an ID for a topic, with link options to parent elements and child elements.

<!ENTITY % id-group "id ID #REQUIRED
                      parent IDREF #IMPLIED
                      children IDREFS #IMPLIED" >
                     
The ID keyword in the id attribute serves as a flag to the XML parser indicating that the ID value must be unique. No duplicate values are allówed. The IDREF keyword on the parent attribute allows a single reference to the ID of the parent of the current element. The IDREFS keyword on the children attribute allows references to the IDs of multiple child elements (each value must be separated by a space). The last two attributes are #IMPLIED, meaning they don't have to be used.

Now you can use this parameter entity as the definition of the attribute list (ATTLIST) for any element in your DTD:

<!ELEMENT topic (title , body, subtopic*) >
<!ATTLIST topic %id-group; >

<!ELEMENT subtopic (title, body, subtopic*) >
<!ATTLIST subtopic %id-group; >

A resulting document instance may look like this ("..." is used to represent content):

<topic id="tp-001 children="tp-002 tp-003 tp-004">
<title>...</title>
<body>...</body>
<subtopic id="tp-002" parent="tp-001">
<title>...</title>
<body>...</body>
</subtopic>
<subtopic id="tp-003" parent="tp-001">
<title>...</title>
<body>...</body>
</subtopic>
<subtopic id="tp-004" parent="tp-001" children="tp-005">
<title>...</title>
<body>...</body>
    <subtopic id="tp-005" parent="tp-004">
    <title>...</title>
    <body>...</body>
    </subtopic>
</subtopic>
</topic>