Using ADO.NET, XML & XSL to generate HTML

The HTML

Here is the resulting HTML:

<html xmlns="http://www.w3.org/TR/REC-html40">
  <body>
    <table border="0" cellpadding="2" cellspacing="0" id="menu">
      <tr>
        <td height="20" nowrap="">
          <a href="index.html">
            <font size="3">Home</font>
          </a>
        </td>
      </tr>
      <tr>
        <td height="20" nowrap="">
        </td>
      </tr>
      <tr>
        <td height="20" nowrap="">
          <center>
            <font size="4" color="#800000">
              <b>Bookstore</b>
            </font>
          </center>
        </td>
      </tr>
      <tr>
        <td height="20" nowrap="">
          <a href="csharp.html">
            <font size="3">C#</font>
          </a>
        </td>
      </tr>
      <tr>
        <td height="20" nowrap="">
          <a href="dotnet.html">
            <font size="3">.NET</font>
          </a>
        </td>
      </tr>
      <tr>
        <td height="20" nowrap="">
          <center>
            <font size="4" color="#800000">
              <b>Notebooks</b>
            </font>
          </center>
        </td>
      </tr>
      <tr>
        <td height="20" nowrap="">
          <a href="notebooks/csharp/index.html">
            <font size="3">C#</font>
          </a>
        </td>
      </tr>
      <tr>
        <td height="20" nowrap="">
          <center>
            <font size="3">
              <b>ATL</b>
            </font>
          </center>
        </td>
      </tr>
      <tr>
        <td height="20" nowrap="">
          <a href="hello.html">
            <font size="3">Hello World</font>
          </a>
        </td>
      </tr>
      <tr>
        <td height="20" nowrap="">
          <a href="errors.html">
            <font size="3">Handling Errors</font>
          </a>
        </td>
      </tr>
    </table>
  </body>
</html>

The ADO.NET and XML support in the .NET framework is a powerful and easy to use combination.  These tools can be used for batch generation of web pages, or used live in ASP.NET.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Memory is like an orgasm. It's a lot better if you don't have to fake it.” - Seymour Cray