473,625 Members | 3,253 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to generate HTML pages

Hi all,

I'm about to embark on a new project and can't decide quite how to do it.
In summary, I have a database whose data I want to use to create html pages
for a website. The website will just be a series of static html pages. I
will keep all the data locally and would generate the required pages and
upload them whenever I needed to. I do not want to have the database
anywhere but on my lcoal machine.

My questions are:
1. Should I create a windows or web application to generate my pages?
2. If a window app, will this be faster?
3. If an web app, how do I automatically save the result of an aspx page as
static html?
4. What would you recommend as the best way to generate these pages -
HTMLTextWriter?
5. Should I perhaps generate XML and use XSL to render the pages?
6. What classes are available (and best) for the generation of html pages?

Which direction would you all head in?
Thanks for any advice or ideas.
Nick
Jul 21 '05 #1
2 2267
>1. Should I create a windows or web application to generate my pages?

My vote would be for a windows app - you're not planning to host it on
a remote machine, you don't need to access it from your holidays on
Hawaii - so there's no point or real benefit in creating a web app,
really.
2. If a window app, will this be faster?
Most likely, yes. A lot more powerful and easier to use, too - the
Windows UI is just that much richer than the severly limited web /
HTML interface can ever be.
4. What would you recommend as the best way to generate these pages -
HTMLTextWriter ?
Have a look at CodeSmith - it's a freeware code generation / template
tool which can be easily used from a .NET app. You could easily set up
your HTML pages as CodeSmith templates, and pull out the data from the
data to feed them into the CodeSmith templates.

http://www.ericjsmith.net/codesmith/
5. Should I perhaps generate XML and use XSL to render the pages?
I don't see much benefit in this, unless you already have XML to begin
with. Otherwise, you'll end up converting your native data format to
XML, then send it through XSL transformation, to end up in HTML - why
not create the HTML from the raw data in the first place? Also, XSL is
not always all that easy to learn and use, and some rather basic
operations (like grouping etc.) are just a royal pain in XSL (at least
in 1.0).
6. What classes are available (and best) for the generation of html pages?


CodeSmith - see above! ;-)

Marc
=============== =============== =============== =============== ====
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)i nova.ch
Jul 21 '05 #2
I would recommend to create XML from the data
and use XSLT to transform into HTML.
That way, you get a flexible solution.
IMO, HTML should never be "hard coded".
Layout is easily modified directly in the XSLT file, in case there is
something you need to change.

And besides, maybe you some day would need some other
format like text or another XML format like XSL-FO or SVG or whatever.
Then, you will only need to write a new XSLT template in a few minutes.

XSLT is very powerful.

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Nick" <ni************ ***@lycos.co.uk > wrote in message
news:2s******** *****@uni-berlin.de...
Hi all,

I'm about to embark on a new project and can't decide quite how to do it.
In summary, I have a database whose data I want to use to create html
pages
for a website. The website will just be a series of static html pages. I
will keep all the data locally and would generate the required pages and
upload them whenever I needed to. I do not want to have the database
anywhere but on my lcoal machine.

My questions are:
1. Should I create a windows or web application to generate my pages?
2. If a window app, will this be faster?
3. If an web app, how do I automatically save the result of an aspx page
as
static html?
4. What would you recommend as the best way to generate these pages -
HTMLTextWriter?
5. Should I perhaps generate XML and use XSL to render the pages?
6. What classes are available (and best) for the generation of html pages?

Which direction would you all head in?
Thanks for any advice or ideas.
Nick

Jul 21 '05 #3

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

Similar topics

9
2311
by: Fred | last post by:
Hi, I'm sure there are a bunch of them, but googling just returned full-fledged CMS that require a DBMS and generate dynamic pages. I'd just like a script that would 1. look in a directory for articles in raw HTML, 2. generate a cooked output for each page (ie. add header and footer, CSS link in HEAD, etc.), 3. regenerate the homepage with "Last modified" bit following each
11
1725
by: shank | last post by:
<% Response.contenttype = "application/vnd.ms-excel" %> <% Response.AddHeader "Content-Disposition", "filename=hardware.xls" %> I'm using the above lines to generate a spreadsheet from a recordset. One of the recordset fields has HTML data. Whenever the spreadsheet is generated, it will place some of the HTML data into new rows. Same appropriate column, but different rows. Is there a way around this? Is there an easy to create a DBF or...
4
43219
by: Dehaibe François | last post by:
Hi, I'm making a program which uses a scanner which is enable to can multiple pages. I want to save all the scanned images into a PDF FILE. Does exist an API which can generate PDF FILE in .NET ? Best Regards,
2
1456
by: zoltix | last post by:
Hello, I try to send an xml from an aspx pages which generate an xml file. And I tried with this method FileStream fs = new FileStream(WebSdxResponse.file_path,FileMode.Open,FileAccess.Read,FileSh are.None); byte b = ReadFully(fs,(int) fs.Length);Response.Clear();
4
393
by: Nick | last post by:
Hi all, I'm about to embark on a new project and can't decide quite how to do it. In summary, I have a database whose data I want to use to create html pages for a website. The website will just be a series of static html pages. I will keep all the data locally and would generate the required pages and upload them whenever I needed to. I do not want to have the database anywhere but on my lcoal machine. My questions are:
5
1854
by: Rob Roberts | last post by:
Is there any way to change VS2005 to generate HTML 4.01/Strict instead of XHTML 1.0/Transititional? VS2005 puts a DOCTYPE statement specifying XHTML 1.0/Transitional at the top of every new aspx page. Is there any way to change it to specify an HTML 4.01/Strict DOCTYPE instead? Thanks in advance, --Rob Roberts
6
5232
by: ash | last post by:
i have a web page using frameset split into few pages. And I want to generate one page of HTML code and send it through email. My question is have to generate a HTML page using asp? Thx very much.
5
1886
by: vikram | last post by:
I am developing a display web site which displays several listing and details, data is picked up from database for the lists. There is no search criteria but only pagination stuff. What i am thinkin gis to create a program which will read data and generate static html pages for the lists and dump the pages on the web server. when user will acees they will acces html pages instead of aspx pages, helps perfroamnce improveents. Is it a right...
5
3158
by: pittendrigh | last post by:
There must be millions of dynamically generated html pages out there now, built by on-the-fly php code (and jsp, perl cgi, asp, etc). Programatic page generation is transparently useful. But querying a database, negotiatinig lots of if-then-else logic and echo'ing html code out on port 80 every time a page is requested has to be a huge waste of resources. Why not use that logic to print static html instead of dynamic?
0
8256
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8356
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7184
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.