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

Forums / 3.x Pre-release forums (retired) / RadRotator in user control error

RadRotator in user control error

10 posts, 0 answered
  1. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    19 Jan 2007
    Link to this post
    The following error occurs if a RadRotator is added to a user control and then added to either a page or a template.

     

    Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

  2. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    19 Jan 2007
    Link to this post
    Just to clarify.

    The error occurs when you hit the Save or Cancel button after adding the usercontrol to the template or page.

    Following that we added the usercontrol directly on the Template in VS. Attempting to drag a Generic Content into another placehoder throws another error.

    Sincerely,

    Ben
  3. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    21 Jan 2007
    Link to this post
    Hi

    I too have had this problem a few times with various things, I haven't had time to report it to Telerik so I am glad you are.

    I found a work around simply add:

    EnableEventValidation
    ="true"

    to the page declaration of Templates.aspx, EditPage.aspx and CtrlProps.aspx in the Admin folder, those are the 3 pages I have had this problem with so far.

    Cheers
    Sean
  4. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    21 Jan 2007
    Link to this post
    Doh!  damn intellisense, it is mean to be equal to false..

    Sorry about that.
  5. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    22 Jan 2007
    Link to this post
    Sweet. Thanks for the great response. That was really bugging me. I will give it try today.

    Sincerely,

    Ben
  6. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    22 Jan 2007
    Link to this post
    That worked great for the rotator, but I had a some custom rotator navigation that is still failing. The rotator navigation uses the rotator client API as follows.

    <div id="bannerNavigation">
    <button onclick="<%=bannerRotator.ClientID%>.StopRotator(); <%=hyperlinkRotator.ClientID%>.StopRotator();"
    type="button" class="pause">
    </button>
    <button onclick="<%=bannerRotator.ClientID%>.StartRotator(); <%=hyperlinkRotator.ClientID%>.StartRotator();"
    type="button" class="play">
    </button>
    <button onclick="<%=bannerRotator.ClientID%>.StopRotator(); <%=hyperlinkRotator.ClientID%>.StopRotator(); <%=bannerRotator.ClientID%>.ShowPrevFrame(); <%=hyperlinkRotator.ClientID%>.ShowPrevFrame();" type="button" class="back">
    </button>
    <button onclick="<%=bannerRotator.ClientID%>.StopRotator(); <%=hyperlinkRotator.ClientID%>.StopRotator(); <%=bannerRotator.ClientID%>.ShowNextFrame(); <%=hyperlinkRotator.ClientID%>.ShowNextFrame();" type="button" class="forward">
    </button>
    </div>

  7. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    22 Jan 2007
    Link to this post
    It also throws an error when I try to add a Generic Content control to any Content Place Holder on a Page or Template because I am using server side databinding. I would expect that is a problem with most controls.

    RadRotator: You have not specified a template OR there is problem with your databinding expression (possibly you haven't specified a datasource or content file).

  8. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    24 Jan 2007
    Link to this post
    Hello Ben,

    The r.a.d.rotator throws this error (RadRotator: You have not specified a template OR there is problem with your databinding expression (possibly you haven't specified a datasource or content file).) when it is not bound to data source or its DataSource is null.
    Please check this out and if this is not the case, could you please send us you project with instructions how to reproduce.

    Regards,
    Vlad
    the telerik team
  9. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    24 Jan 2007
    Link to this post
    In the codebehind I am using:

    hyperlinkRotator.DataSource = _dsBanners
    hyperlinkRotator.DataBind()

    Where _dsBanners is a dataset that holds a list of GenericContent items. That is why I don't have a datasource on the page.

    Sincerely,

    The other Ben

  10. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    25 Jan 2007
    Link to this post
    Hi Ben,

    Is it possible that _dsBanners is null and this is causing the error.
    Could you please send us your custom user control with the rotator, so we can test it locally?

    Sincerely yours,
    Vlad
    the telerik team
Register for webinar
10 posts, 0 answered