+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / NewsRotator Widget

NewsRotator Widget

6 posts, 0 answered
  1. David Whritenour
    David Whritenour avatar
    22 posts
    Registered:
    30 Nov 2009
    30 Nov 2010
    Link to this post
    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
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Nov 2010
    Link to this post
    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.
  3. David Whritenour
    David Whritenour avatar
    22 posts
    Registered:
    30 Nov 2009
    01 Dec 2010
    Link to this post
    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
  4. David Whritenour
    David Whritenour avatar
    22 posts
    Registered:
    30 Nov 2009
    07 Dec 2010
    Link to this post
    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
  5. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    08 Dec 2010
    Link to this post
    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.
  6. David Whritenour
    David Whritenour avatar
    22 posts
    Registered:
    30 Nov 2009
    08 Dec 2010
    Link to this post
    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

6 posts, 0 answered