static html generation in C#

  • Thread starter Thread starter chris
  • Start date Start date
C

chris

Hello all -

I'm a bit stuck and am wondering what is the best way to generate static
html from a C# program? Any pointers would be helpful. The info is not
currently coming from a database but it might be in the future.

TIA
 
HI,

You can use XML+XSL to generate html.

If you'll use ADO.NET for data access, then you can get dataset in XML DOM
object. an then, you can transform XML DOM object to HTML using XSL.
 
Hiroaki said:
HI,

You can use XML+XSL to generate html.

If you'll use ADO.NET for data access, then you can get dataset in XML DOM
object. an then, you can transform XML DOM object to HTML using XSL.

Hello -

Thanks for the reply. Any example you could point me to? Thanks.
 
Hiroaki SHIBUKI said:
HI,

You can use XML+XSL to generate html.

If you'll use ADO.NET for data access, then you can get dataset in XML DOM
object. an then, you can transform XML DOM object to HTML using XSL.

I think he means generating HTML from C# source code.
So that

using System;
namespace Test
{
class X
{
}
}

becomes something like

<html>
<body>
<pre>
<font color="blue">using</font> System;
<font color="blue">namespace</font> Test
{
<font color="blue">class</font> X
{
}
}
</pre>
</body>
</html>

Ivan
 
Ivan said:
I think he means generating HTML from C# source code.
So that

using System;
namespace Test
{
class X
{
}
}

becomes something like

<html>
<body>
<pre>
<font color="blue">using</font> System;
<font color="blue">namespace</font> Test
{
<font color="blue">class</font> X
{
}
}
</pre>
</body>
</html>

Ivan

No, I want to generate a web page from C#.
 
Your request is a little unclear in generating static html - isn't that
dynamic html - otherwise its not very static. . You could use ASP.NET to
output HTML as thats all ASP.NET does really, or you could simply write
pages using the file system classes by opening blank files and adding text
to them.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------
 
Back
Top