Try our conversational search powered by Generative AI!

Render page properties in xml


Hi all,

I am looking to render the contents/properties of a page in xml as opposed to using the pagetype's associated template - if a parameter was present in the querystring.

I was thinking of writing a httphandler to do this but it seems it would be difficult to get access to the requested page's PageData (in the 'ProcessRequest' method).

Is there some way of achieving this? - if so any help would be much appreciated.

Thank You

May 02, 2011 18:03


I'd loop over the PageData.Property.

            foreach(PropertyData objData in CurrentPage.Property)
var x = objData.Name;
var y = objData.Value;



I see now that you might want to get the PageData object. Check the SDK for DataFactory.GetPage()

Edited, May 02, 2011 20:05

One easy way is to change the master page by overrirde the OnPreInit

protected override void OnPreInit(EventArgs e)
                MasterPageFile = "/Custom/MasterPages/PageNotFound.master";


Then you can easy use the code Hernrik posted.



May 03, 2011 8:28

You could create a PagePlugIn and hook the PageBase.PageSetup event and then attach your code to every page request.

Check out Allan Thraens blogpost on how he does much the same thing, though rendering to PDF, but the same principle
would apply:


May 03, 2011 8:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.