Cascade lookup - getting Server Error in '/' Application

Aug 12, 2010 at 11:17 AM
Edited Aug 12, 2010 at 11:19 AM

Any advice? I have 3 cascading lookups, they work fine, but when I`m trying to save form, I get an error.

Here is the code:

<script language="javascript" type="text/javascript" src="../../jQuery/jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript" src="../../jQuery/jquery.SPServices-0.5.6.min.js"></script>
<script language="javascript" type="text/javascript">
        $(document).ready(function() {
        $().SPServices.SPCascadeDropdowns({
            relationshipList: "Notikuma tips 2. līmenis",
            relationshipListParentColumn: "Title1",
            relationshipListChildColumn: "Title2",
            parentColumn: "Notikuma tips 1. līmenis",
            childColumn: "Notikuma tips 2. līmenis",
            promptText: "(None)",
            debug: true
        })});
        $(document).ready(function() {
        $().SPServices.SPCascadeDropdowns({
            relationshipList: "Notikuma tips 3. līmenis",
            relationshipListParentColumn: "Title2",
            relationshipListChildColumn: "Title3",
            parentColumn: "Notikuma tips 2. līmenis",
            childColumn: "Notikuma tips 3. līmenis",
            promptText: "(None)",
            debug: true
        })});
        $(document).ready(function() {
        $().SPServices.SPCascadeDropdowns({
            relationshipList: "Cēloņa tips 2. līmenis",
            relationshipListParentColumn: "CTitle1",
            relationshipListChildColumn: "CTitle2",
            parentColumn: "Cēloņa tips 1. līmenis",
            childColumn: "Cēloņa tips 2. līmenis",
            promptText: "(None)",
            debug: true
        })});
        $(document).ready(function() {
        $().SPServices.SPCascadeDropdowns({
            relationshipList: "Cēloņa tips 3. līmenis",
            relationshipListParentColumn: "CTitle2",
            relationshipListChildColumn: "CTitle3",
            parentColumn: "Cēloņa tips 2. līmenis",
            childColumn: "Cēloņa tips 3. līmenis",
            promptText: "(None)",
            debug: true
        })});
        $(document).ready(function() {
        $().SPServices.SPCascadeDropdowns({
            relationshipList: "Biznesa procesu 2. līmenis",
            relationshipListParentColumn: "BTitle1",
            relationshipListChildColumn: "BTitle2",
            parentColumn: "Biznesa procesu 1. līmenis",
            childColumn: "Biznesa procesu 2. līmenis",
            promptText: "(None)",
            debug: true
        })});
        $(document).ready(function() {
        $().SPServices.SPCascadeDropdowns({
            relationshipList: "Biznesa procesu 3. līmenis",
            relationshipListParentColumn: "BTitle2",
            relationshipListChildColumn: "BTitle3",
            parentColumn: "Biznesa procesu 2. līmenis",
            childColumn: "Biznesa procesu 3. līmenis",
            promptText: "(None)",
            debug: true
        })});
</script>

Here is the 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) +2132728
   System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +108
   System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) +55
   System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +11
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +353
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1194



Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

If I do not fill in these, then form is saving smoothly.

Coordinator
Aug 12, 2010 at 11:29 AM

It's certainly possible that you've unearthed a bug, especially since it looks like you are working in a language other than English. My suggestion would be to remove the cascades and add them back one by one to see which is causing the issue. That should give us more info to go on.

It also might be the promptText causing the problem. If you have required columns, you shouldn't specify that (though I also shouldn't use it if you do).

M.

Aug 12, 2010 at 11:50 AM

Ok, removed promtText, and filling in one by one.

It gives me to fill in 3 cascades.

A1
A1.1
A1.1.1

B1
B1.1
and B1.1.1 not - again the same error.

But I need:
A1
A1.1
A1.1.1

B1
B1.1
B1.1.1

C1
C1.1
C1.1.1

It also allows:

A1
A1.1

B1
B1.1

C1
c1.1

It looks like there is some king of maximum of 3 cascades...

Coordinator
Aug 12, 2010 at 11:54 AM

There's no maximum; iI've done at least 5. You're only limited by the performance hit.

I'm not sure I understand what you've given above. Did you remove all calls to SPCascadeDropdowns and then add them back in one at a time until you received the error?

M.

Aug 12, 2010 at 12:10 PM

I googled that there is some kind of validation problems.

Coordinator
Aug 12, 2010 at 12:27 PM
PGh0bWw+PGJvZHkgYmdjb2xvcj0iI0ZGRkZGRiI+PGRpdj5JdCdzIGRlZmluaXRlbHkgYSB2YWxp ZGF0aW9uIGlzc3VlLiBJJ20ganVzdCBob3Bpbmcgd2UgY2FuIGlzb2xhdGUgaXQgYSBsaXR0bGUg bW9yZSBzbyB0aGF0IHdlIGNhbiBkZWJ1Zy48L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2Pk0uPGJy Pjxicj48ZGl2Pjxicj48L2Rpdj48L2Rpdj48ZGl2Pjxicj5PbiBBdWcgMTIsIDIwMTAsIGF0IDc6 NTksICJiYWFybWVuaXMiICZsdDs8YSBocmVmPSJtYWlsdG86bm90aWZpY2F0aW9uc0Bjb2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?

Coordinator
Aug 12, 2010 at 7:51 PM

Sorry. I really can't reply from my iPhone. Maybe Microsoft has all non-Windows 7 phone blocked. ;+)

 

It's definitely a validation issue. I'm just hoping we can isolate it a little more so that we can debug.

 

M.

Sep 2, 2010 at 12:18 PM

Guys, I really need help with this one

Sep 2, 2010 at 1:15 PM

Managed to figure this out, don`t use other than english names in columns :)