Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Zakwan Koussa 2 posts 52 karma points
    Sep 02, 2013 @ 00:06
    Zakwan Koussa
    0

    ASCX macro doesn't work by adding in richtext editor

    Hi all,

    I created a user control macro. The user control contains an ASP.NET wizard with dynamic added steps. If I add the macro directly in the template, it works without any problems. But when I add the macro in rich text editor then I can run only the first step of the wizard and then I get an exception with the message "wizard usercontrol ActiveViewIndex is being set to '3 '. It must be smaller than the current number of View controls '1. 'For dynamically added views, make sure They are added before or in Page_PreInit event "

     

    I add the wizard in the Page_Init event because the user controls don'thave the event Page_PreInit, but I do not think that's the problem, because as I said, if I add the macro directly in the template, then it works without problems. Do you have any experience with this issue? or will you recommend me to use a web control instead of user control?

    I tried to call the user control macro in a XSLT macro by "MacroRenderContent" but that did not work, the macro was not rendered and I've read here on the forum that it doesn't work.

    Thanks in advance for your replies. 

  • Zakwan Koussa 2 posts 52 karma points
    Sep 02, 2013 @ 16:30
    Zakwan Koussa
    100

    I solved the problem by converting the user control in web control. I still create the wizard in OnInit event and it works as expected. 

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies