asp.net - Update DropDownList control after inserting an item with a detailsview -
i have update panel includes dropdownlist command , detailsview control. dropdownlist populated sqldatasource command grabs info table called places (just list of venues). detailsview insert mode , inserts places database table populates dropdownlist. trying allow insert new place within update panel , have dropdownlist refreshed @ same time user see places in dropdownlist, including 1 added details view. right now, detailsview adding place database not updating dropdownlist. if refresh page after adding new place, droplist updates new place. suggestions?
disclaimer: reply posted before code posted in question.
this assumes both controls within update panel.
in event handler updating or inserting detailsview control, need add together next code:
mydropdownlist.databind()
and, worst case scenario, can if update panel causing problems. it's not greatest performance-wise though.
response.redirect(request.rawurl)
asp.net updatepanel detailsview html-select
No comments:
Post a Comment