Search code examples
c#asp.netasp.net-2.0

Transclude content of one ASPX page to another


Background: I'm trying to make an extremely light news sort of...thing that relies entirely on hard code ASPX documents (not my decision). What I would like to do is create a bit of dynamic updating by having the main news page pull the latest ASPX file from a folder and get its "TopContent" section on the main page. How would I best be able to do that? I'm stuck with ASP.NET 2.0 on this project as well.


Solution

  • So I didn't quite transclude ASPX documents, but I found a way to get this to work by having XML files with the data pieces I needed and just using that. No problem.

    In detailed: An XML file containing the title, the top content and the main content and then using a URL argument to figure out which file to open.