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

Forums / Developing with Sitefinity / Help! Error with user control

Help! Error with user control

2 posts, 0 answered
  1. Derrick
    Derrick avatar
    7 posts
    Registered:
    20 Feb 2009
    23 Apr 2009
    Link to this post

    I am user SiteFinity 3.6
    I made a user control the has a drop-down list and a button that cause postbacks. 

    When I try to drag the control onto a sitefinity page I get this error:

    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.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: 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.
    -------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

    Since a have two controls that cause postbacks,
    I added these lines to my control in the Page_Load event:

     Page.ClientScript.RegisterForEventValidation(enrolledList.UniqueID);
     Page.ClientScript.RegisterForEventValidation(saveForm.UniqueID);

    But I continue to get the error.  Does anyone know a workaround for this?
    By the way, the two controls are in an UpdatePanel control if that makes any difference.

    Thanks, Derrick.

  2. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    27 Apr 2009
    Link to this post
    Hello Derrick,

    we have not had this problem reported yet, so we'd really appreciate it if you can send us your User Control for inspection. After inspection we'll be able to provide you with a solution for your problem.

    We'll be waiting for your response.

    Greetings,
    Ivan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered