Serious problem in VS Designer when placing editor inside a View control

Last post 08-08-2007, 2:00 PM by errrick. 1 replies.
Sort Posts: Previous Next
  •  07-30-2007, 1:00 PM 32007

    Serious problem in VS Designer when placing editor inside a View control

    When you place the Editor control inside a View control which is inside a MultiView control, VS designer will throw an exception and will not render the entire MultiView which is a serious problem for me.

    The exception details are as follows:

    "Error Rendering Control
    An unhnandled exception has occurred.
    The control collection cannot be modified during DataBind, Init, Load, PreRender, or Unload phases"

    As far as I know this issue is more VS related rather than bad coding/bug inside the controls which causes the exception, but unfortunately there is no fix for this issue by Microsoft.

    When this happened to me with one custom control I had, a workaround I found to keep using the designer was to put a try catch on those events that it was overriding, in my case OnInit and PreRender.

    That way the control would still render in designer, and work properly in my web site.

    Since I don't have access to CuteEditor source, I cannot do the same workaround for it so I need it to be fixed in some way as soon as possible.

    Thanks

    Eric, a still loyal CuteEditor customer ;)
  •  08-08-2007, 2:00 PM 32319 in reply to 32007

    Re: Serious problem in VS Designer when placing editor inside a View control

    ok, one workaround I found for this issue was to put the Cute Editor inside a UserControl called "Editor.ascx", then wrap those specific properties I would sure use/modify (such as Text, Width, Height) and the problem was gone.. VS Designer will work ok

    I also found this solution pretty nice for simplifying CuteEditor's aspx markup declaration since I use the same properties for all my pages so whenever I had to change one styling or other property, I had to do the same on all pages

    Hope this helps anyone

    Eric

View as RSS news feed in XML