473,396 Members | 1,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

rendering to html files

hi,
i have an idea to make admin tool on home computer, that would generate html
files using some kind of templates and database data and put these generated
html files to public web server, witch doesn't have running asp.net, using
ftp access.
why i need so?
because:
1) my project doesn't need to receive any data from browsing customers, it
will be only company news, info about new products - so it's enough to have
static html on webserver
2) web servers, witch doesn't have asp.net running are definetly cheaper,
even if i'll place on my own server, using scheme mentioned above i'll have
many advantages:

a) less traffic,
b) less server cpu
c) less security holes (no public access to any aspx, just html)
d) once again, no need to have asp.net on public web server

my question is:
how to make this happen, i couldn't find info about this approach. i could
write html tag by tag inserting database data, but that would be hard to
maintain and a lot of coding and so on. may be there's a nice way - let's say
1) i make regular aspx,
2) from admin tool i call some kind of method, that analysies that aspx
3) and generated html saves to html file

or smth like that?
Jul 26 '06 #1
2 1751
I must say that I disagree with your reasoning, but if that's what you want
to do, that's your choice. As far as your question, I would look into the
HtmlTextWriter class. This makes it very easy to write html, it is what is
used by the ASP.NET Controls when generating the code that is sent to the
browser, but you could also use it to create a text file by changing where
it sends the output. This class inherits the TextWriter class, so if you
have used TextWriter (which is not hard once you've seen an example) you
shouldn't have any trouble learning HtmlTextWriter. But, like I said, I
disagree with your logic, it sounds like you might want to learn a little
bit more about ASP.NET. If your pages are generated from database data like
you said, wouldn't it be nice to have them automatically updated rather than
need to worry about making a new page every time a new product came out? If
you're trying to procrastinate learning ASP.NET, trust me, you'll regret it
someday.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Giedrius" <Gi******@discussions.microsoft.comwrote in message
news:38**********************************@microsof t.com...
hi,
i have an idea to make admin tool on home computer, that would generate
html
files using some kind of templates and database data and put these
generated
html files to public web server, witch doesn't have running asp.net, using
ftp access.
why i need so?
because:
1) my project doesn't need to receive any data from browsing customers, it
will be only company news, info about new products - so it's enough to
have
static html on webserver
2) web servers, witch doesn't have asp.net running are definetly cheaper,
even if i'll place on my own server, using scheme mentioned above i'll
have
many advantages:

a) less traffic,
b) less server cpu
c) less security holes (no public access to any aspx, just html)
d) once again, no need to have asp.net on public web server

my question is:
how to make this happen, i couldn't find info about this approach. i could
write html tag by tag inserting database data, but that would be hard to
maintain and a lot of coding and so on. may be there's a nice way - let's
say
1) i make regular aspx,
2) from admin tool i call some kind of method, that analysies that aspx
3) and generated html saves to html file

or smth like that?

Jul 27 '06 #2
i think you get my idea wrong, may be because of my english. page is updated
everytime, when user edits database - that's usual, but it won't be processed
by asp.net everytime user views it - that's not usual.

how often company produces/receives a new product? once a month? so, i need
to update page let's say once a month and it's viewed let's say 100 times a
month, so i think to have static html instead of rendering page everytime
user views it is quite clever. i know, asp.net has great caching features,
but that's another question.

anyway, i found more than a simple solution by my self - i just point
webrequest class from my admin tool to aspx page and i receive all the html
stream, witch i can write to file, so aspx pages are editable by visual
studio and i'm producing html files home, not at the web server.

regarding all the render html file, don't use php/aspx everytime page is
viewed approach, i think that's the way www.blogspot.com works, it saves data
in database and every time there's a new post it makes publishing, as i
called it "rendering to html file".

"Nathan Sokalski" wrote:
I must say that I disagree with your reasoning, but if that's what you want
to do, that's your choice. As far as your question, I would look into the
HtmlTextWriter class. This makes it very easy to write html, it is what is
used by the ASP.NET Controls when generating the code that is sent to the
browser, but you could also use it to create a text file by changing where
it sends the output. This class inherits the TextWriter class, so if you
have used TextWriter (which is not hard once you've seen an example) you
shouldn't have any trouble learning HtmlTextWriter. But, like I said, I
disagree with your logic, it sounds like you might want to learn a little
bit more about ASP.NET. If your pages are generated from database data like
you said, wouldn't it be nice to have them automatically updated rather than
need to worry about making a new page every time a new product came out? If
you're trying to procrastinate learning ASP.NET, trust me, you'll regret it
someday.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Giedrius" <Gi******@discussions.microsoft.comwrote in message
news:38**********************************@microsof t.com...
hi,
i have an idea to make admin tool on home computer, that would generate
html
files using some kind of templates and database data and put these
generated
html files to public web server, witch doesn't have running asp.net, using
ftp access.
why i need so?
because:
1) my project doesn't need to receive any data from browsing customers, it
will be only company news, info about new products - so it's enough to
have
static html on webserver
2) web servers, witch doesn't have asp.net running are definetly cheaper,
even if i'll place on my own server, using scheme mentioned above i'll
have
many advantages:

a) less traffic,
b) less server cpu
c) less security holes (no public access to any aspx, just html)
d) once again, no need to have asp.net on public web server

my question is:
how to make this happen, i couldn't find info about this approach. i could
write html tag by tag inserting database data, but that would be hard to
maintain and a lot of coding and so on. may be there's a nice way - let's
say
1) i make regular aspx,
2) from admin tool i call some kind of method, that analysies that aspx
3) and generated html saves to html file

or smth like that?


Jul 27 '06 #3

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

Similar topics

14
by: Bill Thoralina | last post by:
Hi, I created an XHTML page, but for some reason it isn't rendering on my browser. It is showing up as code. Any suggestions? Thanks.
2
by: Jim Adams | last post by:
My project requires IIS (dotNet) and Apache to consume the same web service. What's the recommended way to display the same HTML output from both platforms? I've read about server-side XSLT...
0
by: Shashikiran Prabhakar via .NET 247 | last post by:
(Type your message here) Hi, I am not very conversent in VC++, but the requirement for me is to run a rendering code. However i am encountering the following errors. c:\Program...
5
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever....
3
by: ramesh | last post by:
Hi all, I am facing a problem with the rendering of html into a windows application (C# .NET). I am trying with two possible approaches: 1. Use a control that directly renders the html into...
0
by: Juan R. | last post by:
Since the idea of encoding mathematics using MathML is being very far from popular due to a number of factors -expensive tools, bad accesibility of generated code, unusual verbosity, lack of...
1
by: Ricardo Quintanilla G. | last post by:
how to override the rendering method of a whole asp.net applicaction? i want to not include spaces between html elements. As example, then rendering produce that: == == == == <html> <body>...
7
by: tburger | last post by:
Hey everyone- I've been working on a website for my dad and I've designed it on a Mac... The layout looks proper when I open it in Firefox, Camino, and Safari on OSX, but the text rendering is...
3
by: Jordan S. | last post by:
I would appreciate your thoughts and opinions on the following: I am looking to render documents into multiple document formats. At a minimum the documents will need to be rendered as HTML, and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.