How do you make static pages? In the past I'd just use some File.IO and write myself *.html pages... but I want a little more functionality this time.. Here's what I'm trying to do: I have some articles which aren't ever going to change. Let's say there's 100 of them, and I don't want to have them all as article-name.aspx grouped together in my project. I'm gonna put them all into SQL like a normal person. But unlike a normal person, I'm not going to run a query and go get an article when someone wants to read it -- these articles aren't going to change and I want to generate them all upfront at once. Now to make things a little harder, I have a masterpage and I would like these articles to use the masterpage. Can I programatically create aspx files, would that work? (does asp.net wanting be a compiled app block my ability to do this?? aspx files are just text files right???) Any ideas would be appreciated
You could create a "template" .aspx page with the look and feel you like, then use the System.IO.StreamReader class to read the file, then place the content into a string and pull in your desired content from the database and then write the string back out as a .aspx file using System.IO.StreamWriter class.
Sorry not sure of ASPX but I used this kind of things using File system object in ASP but creating Static HTML and naming them with the page Titles, that was for SEO