У меня есть ListView внутри панели обновления, и я хотел изменить запрос выбора из кода, запускаемого событием нажатия кнопки, а затем перезагрузить ListView внутри панели обновления. Кто-нибудь знает, как вызвать обновление панели обновлений из кода позади?





Просто сделать:
YourUpdatePanelId.Update();
От MSDN:
If the page is enabled for partial-page rendering, when you invoke the Update method, the UpdatePanel control's content is updated in the browser. Call the Update method if you have server code that must execute to determine whether an UpdatePanel control should be updated. If you plan to use the Update method, set the UpdateMode property to Conditional. If you want the decision to update the panel to be determined in server logic, make sure that the ChildrenAsTriggers property is false and that no explicit triggers are defined for the panel.
In a typical page development scenario, if you define triggers or if the ChildrenAsTriggers property is true for the UpdatePanel control, the Update method is automatically called during the page life cycle.
If the ContentTemplate property is not defined for the UpdatePanel control, no updates of the panel will occur.
Хороший, простой и легкий .. !!
Но он не перезагружает GridViews внутри UpdatePanel, во всяком случае, не для меня. Должен ли я использовать GridView.DataBind () в любом случае?
Спасибо! Это избавило меня от множества проблем :)