NewsRotator Widget

Posted by Community Admin on 05-Aug-2018 21:53

NewsRotator Widget

All Replies

Posted by Community Admin on 30-Nov-2010 00:00

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

Posted by Community Admin on 30-Nov-2010 00:00

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.

Posted by Community Admin on 01-Dec-2010 00:00

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

Posted by Community Admin on 07-Dec-2010 00:00

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

Posted by Community Admin on 08-Dec-2010 00:00

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.

Posted by Community Admin on 08-Dec-2010 00:00

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

This thread is closed