Getting Value must not be null for Controls and Behaviors when using Rad Rotator

3 posts, 0 answers
  1. Eric
    Eric avatar
    7 posts
    Member since:
    Jul 2011

    Posted 27 Sep 2011 Link to this post

    We are getting an error when trying to use the Rad Rotator on one of the pages of our ASP.NET 4.0 application. The rotator will load some of the time, other times, we get this error -
    Error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
    Parameter name: element
    Source File: http://localhost:9310/ScriptResource.axd?d=Og_O6TllbWaFOFwDL58zidgG5xexh_EpqE1FBp0IrVx1QMXVLRV_HIzBkd8GOTRutd37dLhAUd4mEXqoyCd_yuCwpZMeMn_t9LTLgFMckE9oWmUHtvPumKOdZcZC855DWCHXZw2&t=ffffffff8674b0ba
    Line: 4621

    I have removed the majority of the code inside of the Rotator to try and pin down this issue, but to no avail. Below is the rotator declaration:
    <telerik:RadRotator ID="imgRotatorFeaturedPhoto" runat="server"
    ClientIDMode="Static" ScrollDirection="Left"
    RotatorType="AutomaticAdvance" Width="210" ItemWidth="210" Height="285" ItemHeight="285"
     FrameDuration="5000"  WrapFrames="false" ScrollDuration="500">
    <ItemTemplate>
    <div style="text-align:center;">
        <div style="background-color:#E6E7E8;padding-bottom:5px;height:150px;padding-top:5px;" runat="server" id="divImageHolder">
       
        <asp:Image runat="server" ID="imgImageItemFP" ClientIDMode="AutoID" CssClass="hoverImage" />
        </div>
        <div style="border-top:1px solid White;background-color:Black;color:White;height:118px;text-align:left;padding-top:5px;">
         <div class="defaultTextColor bold">
                <strong><asp:Label runat="server" ID="lblTitle"></asp:Label></strong>&nbsp;
                <asp:Label ID="lblDate" runat="server"></asp:Label>
                </div>                
            <div class="details">
                <asp:Label ID="lblRetailer" runat="server" style="color:White;"></asp:Label>
                </div>
            <div class="details">
                <asp:Label ID="lblBanner" runat="server" style="color:White;"></asp:Label>
                </div>
                <div class="details">
                 <strong>Location:</strong>&nbsp;<asp:Label ID="lblLocation" runat="server"></asp:Label>
                </div>
                <div style="padding-top:5px;">
        <asp:HyperLink runat="server" ID="hlGoToMediaGallery" NavigateUrl="/MediaGallery/MediaGalleryHome.aspx" CssClass="BackgroundBlue" Text="GO TO MEDIA GALLERY"></asp:HyperLink>    
    </div>
        </div>
    </div>
    </ItemTemplate>
    </telerik:RadRotator>


    During the page load, we bind a list of Images to the rotator, and inside of the ItemDataBound event, we set up the links, and all of the Labels, etc.

    It appears to not even get to this point, and all we see is a blank white box where the rotator is supposed to go. I have done some research, and some people seem to think that this is a bug inside of the Microsoft AJAX Control toolkit, which we are using in other parts of the page.

    Thanks

    Eric
  2. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 30 Sep 2011 Link to this post

    Hi Eric,

    I tried to reproduce the issue, using the presented code, but to no avail. I have attached my test project so that you can compare it with yours and check if there are differences in the setup. You can find also a screen capture, demonstrating the behavior on my end.

    The encountered error is most probably caused by an Ajaxified control on your page, but given the attached code snippet I am not able to provide more information on the matter. Please open a standard support ticket and try to modify my test project so that the issue is reproducible and send it back. If you aren't able to do so, you can also send a sample, runnable project that isolates the problem so that we are able to inspect it locally and suggest a solution.

    Greetings,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eric
    Eric avatar
    7 posts
    Member since:
    Jul 2011

    Posted 30 Sep 2011 Link to this post

    Hi Slav-
    We solved the issue late last night. It turns out that we were passing bad HTML into the tooltip, so when the item was being data bound, the $get was not finding the tooltip inside of the rotator item. We were missing a closing >, from one of our functions that did some special on the fly HTML processing.
    So, not a Telerik problem, but if anyone else is seeing the same issue, be sure to check the HTML being generated first, as the error thrown is not representative of the underlying problem.

    Thanks for looking into this.

    Eric
Back to Top