Hi there,
I'm trying to create a new website that will have a common aspx file
serve as a template. I want all other pages to use this file and
'inject' their own content i.e. user controls, static html etc. The
thing is that I don't actually want these other 'pages' to exist on
disk (since I don't want to have to maintain multiple aspx pages - just
the content). I basically want an XML file that defines the content
'page' path, template file and the actual content. This XML file will
serve as the configuration for the whole process.
The other thing that I want to do is make sure that all of my pages
have friendly URLs i.e. an entry in the XML file with a page path such
as /test.aspx will actually show in the browser as
http://www.mysite.com/test.aspx (even though the physical file does not
exist).
At the moment, I am able to capture a request (using HttpModule) to
this page and write the content of it to the Response object but I'm
not sure how to 'inject' the associated user controls.
I have seen this functionality in action but can't quite put my finger
on how to replicate it. I have also seen reference to using
Context.RewritePath but as far as I can understand this requires a
physical file to exist.
Can anyone help?
Thanks