A few clients have asked to make some static websites because their hosting doesn’t support a server-side language. Now I was wondering are there any tools/techniques for generating a static website from an Asp.net site?
The reason I ask is because without masterpage or any form of templating it gets really cumbersome.
I remember 5 years ago Dreamweaver had a templating system based on html comments but I didn’t like it much so I would like to avoid that.
Check out the RenderControl method. It will essentially let you dump the contents of any ASP.NET page as HTML. So you can build your site dynamically, then dump it all out to HTML and upload it to your antique server.
Here’s a bit of helper code that I swiped from one of my projects to get the contents of any page into a string: