Welcome Guest Search | Active Topics | Sign In | Register

Exception occurs when trying to call RenderControl() on the EO.Web.ProgressBar Options
justice~!
Posted: Tuesday, September 2, 2008 2:44:08 PM
Rank: Newbie
Groups: Member

Joined: 9/2/2008
Posts: 2
Hey guys,

I am using the Microsoft MVC framework and trying to use the EO.Web.ProgressBar through rendering out its HTML (calling RenderControl()). However, I receive an exception inside one of the EO.Web.ProgressBar methods (as the control's assembly is obfustucated the exception seems to occur in method a1()).

What would I need to do in order to be able to call RenderControl() on a new EO.Web.ProgressBar without an exception? Note: I do not want to place the ProgressBar on the page directly - I need to be outputting its HTML instead. Is this possible?
eo_support
Posted: Tuesday, September 2, 2008 3:06:45 PM
Rank: Administration
Groups: Administration

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

We do not officially support MVC because it took out viewstate and postback, both are critical features for "traditional" ASP.NET controls like ours to function. However you can try to call PreRender before RenderControl. RenderControl on our controls will not work unless PreRender is called.

Thanks
justice~!
Posted: Wednesday, September 3, 2008 2:22:58 PM
Rank: Newbie
Groups: Member

Joined: 9/2/2008
Posts: 2
eo_support wrote:
Hi,

We do not officially support MVC because it took out viewstate and postback, both are critical features for "traditional" ASP.NET controls like ours to function. However you can try to call PreRender before RenderControl. RenderControl on our controls will not work unless PreRender is called.

Thanks


You mention trying to call PreRender - that's just an event. The OnPreRender, which you're referring to, is a protected method and thus inaccessible to me (there's no PreRender method in an MVC helper). I can of course inherit from ProgressBar and create a method to provide this rendering but it seems a bit overkill. Were you suggesting a different exposed public method by chance?

Thanks!


eo_support
Posted: Wednesday, September 3, 2008 2:30:56 PM
Rank: Administration
Groups: Administration

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

Sorry about the confusion. OnPreRender is the correct one. The key at here is that the ProgressBar expects a full ASP.NET page life cycle. So you must emulate that. Inheriting from ProgressBar is one way, another way is to put it inside an ASP.NET container control and let the container control to do the life cycle management (assume that you have the container control's life cycle taken care of). Either way I do expect it to be some effort because you are trying to use a traditional ASP.NET control that relies on a "normal" page life cycle with MVC, whose primary goal happens to be get rid of the "normal" page life cyle.

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.