views:

192

answers:

1

Hello everyone

I have a GridView inside an UpdatePanel and because of some bug I can't seem to find, when I download a file (through an iframe inside another updatepanel) the background images of my buttons don't show up.

I thought that, since the download doesn't really need to update the panel (which is causing the bug) I want to prevent the UpdatePanel only in this case from updating.

I know that I can use the atribute "ChildrenAsTriggers = false" but I don't want to put an updatePanel1.Update() in every function called from inside the gridview.

Any solutions?

Thanks in advance

+3  A: 

Hi there,

Use of UpdateMode="Conditional" is actually the correct approach. By default UpdatePanel controls will all update during an asynchronous round trip, but when you want to update only certain panels under certain conditions, the Conditional mode is used.

For performance reasons, Conditional is actually preferred, where you manage through code which panels are updated at which times. For more detailed info, see the remarks on the following MSDN article:

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

Hope this helps!

KP