SPCascadeDropdowns Invalid postback or callback argument error

Jan 20, 2011 at 6:36 AM

Hi there,

I'm having some trouble on submit of my editform.aspx page with the cascade dropdowns.  It's a straightforward two tier drop down and I can see the child values as I'd expect depending on the parent option selected, this works fine.  On submit i get the following 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:


[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.]
   System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +206
   System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) +72
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +507
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2071

 

My code is as follows -

<script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.4.min.js"></script>
<script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery.SPServices-0.5.8.js"></script>
<script language="javascript" type="text/javascript">
 $(document).ready(function() {
  $().SPServices.SPCascadeDropdowns({
   relationshipList: "QAQCLocationCodes",
   relationshipListParentColumn: "Document_x0020_Types",
   relationshipListChildColumn: "Title",
   parentColumn: "Document Type",
   childColumn: "Location Code",
   debug: true
  });
  });
</script>

Setting the enableEventValidation="false" in web.config, although frowned upon, does not throw the error however the child value is not presented on the list item properties, it remains blank regardless of what's selected.

Hopefully someone can help as I can see the potential this has for our environment, it would just be nice to get it to work.  Any help is greatly appreciated.

Coordinator
Jan 20, 2011 at 12:05 PM
I haven't seen this issue before. Is 'Document Type' a Lookup column into the Title In QAQLocationCodes? Is this 2007 or 2010? M.
Jan 20, 2011 at 10:42 PM
Edited Jan 20, 2011 at 10:49 PM

Sorry, I should've explained my lists.

 

QAQCDocumentType is the parent item list with a list of doc types under the title column.

QAQCLocationCodes is the child item list with a list of location codes under title and a lookup field for column Document Types linking back to the QAQCDocumentType title field.

 

It's MOSS2007

 

Chris

Jan 22, 2011 at 12:03 PM

Marc and Chris.. I have seen this before but wanted to ask what type of form this is? IE is it a out of box form and you are editing it with Designer or is it a custom form?

Jan 23, 2011 at 11:32 PM

Standard editform.aspx with the code in my first post in a CEWP under the main form.  I get the same error if I put the code into a editform.aspx page in SP Designer.

Jan 24, 2011 at 1:15 AM

And my document library contains Document Type - lookup into Title field in QAQCDocumentType list and Location Code - lookup into Title field in QAQCLocationCode..........  They work OK on the form, the cascade is working, it's just on submit it falls over.

Coordinator
Jan 24, 2011 at 1:42 AM

All sounds right, I think. Do you have any strange characters in the values?

M.

Jan 24, 2011 at 1:57 AM

( ) / -

However, I've just copied the solution on my production server and it's worked with no problems, could be an issue somewhere else on my staging server.  All appears fine on production. 

Coordinator
Jan 24, 2011 at 2:00 AM

That's always an odd thing, but I'm glad it's working in prod. Let me know if you see anything else unexpected and I'll look into it.

M.

Mar 7, 2014 at 6:38 AM
Hi Eldorado82, I just want to inquire how did you copy the solution on your production server? I was experiencing the same problem and what you did may also work on our side. Thanks!