NewsRotator Widget - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

NewsRotator Widget

  • NewsRotator Widget
  • I am testing Sifefinity CMS 4.0 RC and going throught the "How to create a Widget" exercise".  When I attempt to add the widget to a page, I get the following error:

    "'SitefinityWebApp.MyControls.NewsRotator' is not allowed here because it does not extend class 'System.Web.UI.UserControl'." 

    Any ideas about what is happening?

    Thanks,
    David Whritenour
  • Hi David,

    You are missing some reference or the control you have created is not properly formed in the context of the web application. You might find this discussion useful

    Regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  • Hi Ivan,

    Yea, I reviewed that post prior to posting this question and it did not resolve my problem.
    It should be a fairly straight forward exercise, but I guess I am missing something.
    I will review it again tomorrow when I have had sometime to refresh...

    Thanks,
    David
  • Any other thoughts about this?
    I still am getting the same error.  In 3.7, I do not have this problem.
    I thought it might have something to do with a newer version of RadControls being installed so setup a clean test machine, but still produced the same error.
    Any input would be greatly appreciated.

    Thanks,
    David
  • 236122_newsrotatorregistration.png
    Hi David Whritenour,

    Can you please verify that you have registered the rotator widget in a similar way as in the attached screen shot? It seems that you have registered it as a user control, however the widget is not a user control as it inherits from SimpleView class.

    Regards,
    Radoslav Georgiev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  • I finally got it to work.
    As you know, when the control is initially created, Visual Studio auto generates the following code:

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DemoControl.ascx.cs" Inherits="SitefinityWebApp.MyControls.DemoControl" %>

    I took this code out and now the custom controls works fine.
    Not sure if this was the correct method to make it work given that the training video shows the code still in the control, but it does work now.

    Thanks,
    David