Prevent UpdatePanel Updates

I have a GridView inside an UpdatePanel, and due to some error that I cannot find when I upload a file (via an iframe inside another update panel), the background images of my buttons are not showing.

I thought that since the download does not need to update the panel (which causes the error), I want the UpdatePanel not to be updated only in this case.

I know that I can use the attribute "ChildrenAsTriggers = false", but I do not want to put updatePanel1.Update () in every function called inside gridview.

Any solutions?

Thanks in advance

+4
source share
1 answer

Using UpdateMode="Conditional" is actually the right approach. By default, UpdatePanel will be updated during the round trip asynchronous route, but if you want to update only certain panels under certain conditions, conditional mode is used.

For performance reasons, Conditional is actually preferable when you control code whose panels are updated at what time. See the notes for the following MSDN article for more information:

http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.updatemode.aspx

Hope this helps!

+6
source

Source: https://habr.com/ru/post/1301012/


All Articles