[RESOLVED]update panel – how to prevent parent panel from updating

I have a parent UpdatePanel (panelParent) and within it, I have another UpdatePanel (panelChild).

I have parentChild set to:
 - ChildrenAsTriggers = false
 - UpdateMode = conditional

When I click on my linkbuttons within the panelChild panel, the entire panelParent refreshes.

How can I prevent the parent control from updating?

Thanks,
John

Also, you will need to set the UpdateMode="Conditional" for the outer UpdatePanel ( parent ).

See  "Using Nested UpdatePanel Controls " section in this link for an example.

john_es

I have parentChild set to:
 - ChildrenAsTriggers = false
 - UpdateMode = conditional

What about the parent panel? it must be like the child panel:

- ChildrenAsTriggers = false
 - UpdateMode = conditional

alaa9jo

it must be like the child panel:

- ChildrenAsTriggers = false

In this case, There is no need to set ChildrenAsTriggers proeprty to false.

Reference to MSDN[Taken from
this
link]

Child controls of nested UpdatePanel controls will not cause an update of the
parent UpdatePanel control’s content unless you call the
Update method explicitly or you define the child controls as triggers.

Thanks guys…

I’ve set both the parent and the child update panel to:

- ChildrenAsTriggers = false
 - UpdateMode = conditional

yet, each time I click on the linkbutton in the PagingBulletedList, it postsback and refreshes the parent updatepanel.

What else could I be missing?

for your child panel,change ChildrenAsTriggers to true!

Hey,

Sorry for the hijack – thought it better than starting again.

I have exactly the same problem. I want to stop the child panel from updating the parent panel.

My structure is like this:

ParentUpdatePanel > Repeater > ChildUpdatePanel > Repeater.

The child update panel is a list of attachments for a given item. When somebody refreshes the list of attachments, I don’t want the parent panel to refresh as well.

I have both panels set to Conditional and ChildrenAsTriggers set to false for the parent, and true for the child.

 

Thanks

EDIT: It seems that pressing the Enter key if the updatepanel has focus is causing the postback. Can I disable this if the updatepanel has focus. I have a textbox outside the updatepanel that should still update the updatepanel when pressing the enter key.

EDIT2: Actually, it’s not just Enter key – I put a button inside the child panel and it is updating the parent panel.

Leave a Reply