Welcome Guest Search | Active Topics | Sign In | Register

Rendering EO control in a custom server control Options
MP
Posted: Monday, September 17, 2012 8:41:24 AM
Rank: Newbie
Groups: Member

Joined: 9/17/2012
Posts: 2
Greetings everyone and compliments to the staff, who made a really good job with EO products.

I'm having problems while using the EO control SlideMenu in a custom webcontrol of mine.
The error occurs during Render method, throwing a null reference.

Object gets initialised correctly during Init method of the WebControl, by allocating a new instance and then setting an ID.

Does the control expect any other other value in order to render?
What am I missing?

I'm using EO 9 on a 3.5 framework.

StackTrace:
EO.Web.Internal.cc.l() +309
EO.Web.Internal.cc.ai() +28
EO.Web.WebControlBase.OnLoad(EventArgs e) +88
EO.Web.WebControlBase.br() +270
EO.Web.WebControl.k(HtmlTextWriter A_0) +57
EO.Web.BaseNavigator.a(HtmlTextWriter A_0) +130
EO.Web.WebControlBase.n(HtmlTextWriter A_0) +97
EO.Web.WebControlBase.Render(HtmlTextWriter writer) +215
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
My.WebControl.Render(HtmlTextWriter writer)

Best regards.
eo_support
Posted: Monday, September 17, 2012 11:32:56 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

You can not call RenderControl on our controls. Our control requires a full life cycle so OnLoad, OnPreRender, OnRender has to be called on the right order. This means you have to add it into the page's control tree as early as possible and then let the page's "normal" life cycle go through its course.

Thanks!
MP
Posted: Monday, September 17, 2012 11:40:47 AM
Rank: Newbie
Groups: Member

Joined: 9/17/2012
Posts: 2
OnLoad, OnPreRender and OnRender are exposed to server controls too.
Does it mean i'm still able to emulate the page life cycle, in order to get the control working?

If not, is there any way to handle an EO product programmatically?

Thanks in advance.
eo_support
Posted: Monday, September 17, 2012 11:45:51 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We would neither recommend nor support you to emulate the page's life cycle. You can use our controls programmatically/dynamically, but you must add them into the page's control tree early enough and let the page to handle everything else. For example, you can have your control derive from the Panel control and then add our control as a child control of yours. You can not simulate other things or call the control's RenderControl directly.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.