Last post Jun 21, 2011 07:18 AM by shrikjoshi
Jun 21, 2011 07:18 AM|shrikjoshi|LINK
I am pasting this Solution for the benefit of all the developers having fund of using Jquery, AJAX Updatepanel cool functioanlity. Actually I almost wasted one entire week in order to find the solution to the one error that I was getting for the code I have
I have a JQuery dialogue whose contents were updated asynchronously using AJAX updatepanel. And it was containing Dropdownlist. But when the dropdownlist value is changed it was throwing very strange exception after the page Prerender i.e. Sys.WebForms.PageRequestManager
I went through many blogs various solutions and none of those helped me . But finally I got this solution.
Earlier I used to update the Dropdownlist with following format
I am not sure but AJAX was not able to render this udpation of the Dropdown list.
Then I followed the below approach and it worked like a charm
strProjStatus = dr["Status"]
ddListProjectStatus.SelectedValue = strProjStatus.Trim();
In short you should use .SelectedValue property of the dropdown list present in AJAX updatepanel instead of .selected = true.
I hope this will help to the developers as it troubled me a lot.