ASCX Macro in RTE on a content page DOESN'T trigger PAGE_LOAD event, but triggers PagePreRender
Hi All,
I'm using umbraco 6.1.6, and I have a .NET User control as macro and placed inside a rich text editor in a content page.
For all of my usercontrols, I have a base class(usercontrol) and there I'm handling the errors on any events such as PageLoad, PagePreRender, ... etc
So on my base user control init, I attach the event for each of the event like Page Load, Page Prerender, and these methods invokes respective overridden page events.
ASCX Macro in RTE on a content page DOESN'T trigger PAGE_LOAD event, but triggers PagePreRender
Hi All,
I'm using umbraco 6.1.6, and I have a .NET User control as macro and placed inside a rich text editor in a content page.
For all of my usercontrols, I have a base class(usercontrol) and there I'm handling the errors on any events such as PageLoad, PagePreRender, ... etc
So on my base user control init, I attach the event for each of the event like Page Load, Page Prerender, and these methods invokes respective overridden page events.
For Eg.
*Base User control*
protected override void OnInit(EventArgs e) {
protected void Page_Load(object sender, EventArgs e) { //Some common logic for all usercontrols DerivedPageLoad(); }
protected void PagePreRender(object sender, EventArgs e) { //Some common logic for all usercontrols DerivedPagePreRender(); }
protected void Page_Load(object sender, EventArgs e) { //Some common logic for all usercontrols }
protected virtual void DerivedPagePreRender(object sender, EventArgs e) {
protected virtual void DerivedPageLoad(object sender, EventArgs e) {
Usercontrol
protected override void DerivedPagePreRender(object sender, EventArgs e) { //This is invoked }
protected override void DerivedPageLoad(object sender, EventArgs e) { //This is NEVER invoked }
If I have such a setup, Some how the DerivedPageLoad never invoked, but to the surprise DerivedPagePreRender is invoked and executes
If the derived usercontrol has a such a code (without any overridden method), then it works protected void Page_Load(object sender, EventArgs e) {
Any idea why this happens?
Thanks Santhosh
is working on a reply...