Posted on 27/05/2008 14:22:20
jed@dkis.dk wrote:
Hey Nicloai,
I use the following code in default.aspx.cs
Pageview.Load();
Dynamicweb.Frontend.PageviewControl pvCtrl = new Dynamicweb.Frontend.PageviewControl();
Output.Controls.Add(pvCtrl);
//DanskInternetSelskab Handle XML Result hack
pvCtrl.Pageview.TemplatePage.Html = DanskInternetSelskab.Dw.SearchResultHandler.SearchResultHandler.HandleResult(pvCtrl.Pageview.TemplatePage.Html);
//DanskInternetSelskab Add Vestas Global Tags
pvCtrl.Pageview.TemplatePage.Html = DanskInternetSelskab.Dw.GlobalTags.HandleHtml(pvCtrl.Pageview.TemplatePage.Html);
//DanskInternetSelskab Clean HTML
pvCtrl.Pageview.TemplatePage.Html = DanskInternetSelskab.Dw.CleanCoder.HandleHtml(pvCtrl.Pageview.TemplatePage.Html);
pvCtrl.ParseControls();
i do get the html from the page template however i need all html prio render :)
So - to understand you correctly, you want to get the parsed HTML? From good old days what comes from pv.load()?
Example:
temp = pageview.Output
//do some stuff on temp
Output.text = temp
Then there is a slight issue... This is how it works:
When pvCtrl.ParseControls(); is called, pageview.Output is called internally in the pageview control and the parsed html is handled in an internal variable which is not accessable.
So in other words - you cannot do it.
I've just commited a change to CVS so you would be able to do 2 things:
- A new notification called Notifications.Standard.Page.AfterOutput which will give you the Templatev2.Template object Dynamicweb uses to add global tags. Then you be able to add your own global tags or get the t.output from this object which will give you what you want.
- I've made the internal pageviewControl variable that holds pageview.output to a public property that can be accessed after pvCtrl.ParseControls();
So have to wait for this, or go back to "the old way". The difference is support for Usercontrols in templates.