Sunday, March 11, 2012

CascadingDropDown Category and CascadingDropDownNameValue Causing 500 Error from WebServic

Hi,

Would you mind elaborating more? I don't quite get your question.


Hi,

I meant, in the .aspx you set the category by saing something like Category="model"

and then in the <WebMethod> you return Array of Type CascadingDropDownNameValue. How does that break down to Key/value

The Code above are exactly what i have in the .aspx and webmethod and i'm getting 500 error due to staff being returned from webmethod being in-correct.

Is the code above look ok specially in the webmethod.

Thanks again for trying.


Abshr:

then in the <WebMethod> you return Array of Type CascadingDropDownNameValue. How does that break down to Key/value

The CascadingDropDownNameValue array is converted into a json string and returned, it's something like this:

{"__type":"AjaxControlToolkit.CascadingDropDownNameValue","name":"Integra","value":"Integra","isDefaultValue":false},{"__type":"AjaxControlToolkit.CascadingDropDownNameValue","name":"RL","value":"RL","isDefaultValue":false},{"__type":"AjaxControlToolkit.CascadingDropDownNameValue","name":"TL","value":"TL","isDefaultValue":false}

And javascript is able to parse it into a key/value pair.

500 error indicates an error occurred on the server, you may useFiddler to view the actual error message. It's usually not difficult to correct according to the actual message.

No comments:

Post a Comment