<p>I have a bunch of ASP.NET web pages (that have a standard layout) that are product documentation.  I want to create some sort of combination page that will pull all of the other page content in and concatenate them into one long page.</p>

<p>IFrames won't work because I don't know the size of each page.  I could have the combination page do a ton of #includes, and that would work, but I don't want to have to keep the master update to date (we have a database of page names that can change over time).</p>

<p>Ultimately I'm after something that can get a list of pages, and for each one do the equivalent of a #include for that page into the current page.</p>

<p>I hope that makes sense.  Any thoughts?</p>

What does your pages look like?
I assume it's just plain HTMLs and have a consistent pattern across all pages, no? Like, it has proper HTML markup along with HEAD and BODY and such?
In which case you can just read it like you'd read normal text files and do some string parsing on them to extract the part inside BODY tags and then you can just concatenate those and print them out ASP-#include style.
To get the actual path name to a file on an ASP.NET website, you can use
```
Server.MapPath
```
```
```
var actualDiskFilename = Server.MapPath("~/somewhere/somepage.html");
```
```
All the
```
System.IO
```
classes work the same in ASP.NET, to fetch a list of files in a virtual directory, you can do:
```
```
var virtualDir = "~/somefolder/";
var actualDir = Server.MapPath(virtualDir);

var files = Directory.GetFiles(actualDir);
```
```
Is that what you're looking for?