views:

642

answers:

1

Hi All, I am new to JQuery.....trying to use in my ASP.Net 2.0 website in this scenario: have three asp:dropdownlist at page. First two are filled at server, third one is filled by jquery at client side. There is also asp:imagebutton at page that takes selected values from each dropdownlist after Click event. Well that cause the error: Invalid postback or callback argument...

Besides this fact it works nicely and as user I can change any value at those three dropdownlists without problem, but once I hit button it blows up.

What I am missing?

Any help or suggestion most welcome. Thanks.

+2  A: 

You can't add things client-side to asp:dropdownlists and have it post back. The page will detect that the values are not those that the control had when it was rendered and fail with the error you describe. You can get around this by using an HTML select built client-side, then copy the selected value to a hidden field when the selection changes. Use the value from the hidden field on postback.

tvanfosson