Search code examples
jqueryasp.netajaxgridviewupdatepanel

Maintain dropdownlist viewstate after postback


My set up:

  1. I have a GridView, and two DropDownList in each TemplateField of it.
  2. GridView is enclosed withing Ajax UpdatePanel.
  3. I am populating one DropDownList from selection of other DropDownList using JQuery.

    I works fine till now. But when I submit this form I get EventValidation error. I have solved it by setting EnableEventValidation of Page to false. Error is gone. Fine. But I can't take selected value of DropDownList that was bound using Jquery, also populated values are gone. Seems like ViewState problem to me. Am I wrong? Any suggestions please?


Solution

  • I was not looking possible to me to tackle this in timeline so I swiched to server side binding of drop down list