Thursday, March 15, 2007

ASP.NET AJAX, not let autopostback items cause page reload when the postback occurs

e.g. on my form, clicking on the navigation items (or a dropdownlist control) on the left of screen will filter/refresh the gridview on the right hand side, how can i achieve this using Ajax and not let the navigation items (or a dropdownlist control) to reload themselves? (only the gridview refreshes) the dropdownlist has already been placed outside of UpdatePanel. the whole page reloads because the dropdownlist is "autopostback". I found 3 lines of code that helped me to stop the whole page reload:




This can also be achieved by setting "Triggers" property of the UpdatePanel in design view


No comments: