C# – how to stop an update panel from refreshing when the same updatepanel does the postback

ajaxcnetupdatepanel

I have an update panel with a linkbutton inside of it. The updatepanel has its updatemode set to conditional. From what I understand, regardless if the updatemode is set to conditional, it will refresh the panel, if something inside of it initiates the postback. Is there anyway around this?

Best Answer

Put the content you want to avoid the postback outside of the updatepanel, as far as I know. I haven't heard of another alternative, unless you manually update the UI via JavaScript and AJAX web services.

If you can, don't know the situation, you could consider having the link as a client-side link, and have it do whatever you need to do... as in:

<a href="javascript:void(0);" onclick="doThis();">Do This</a>

What do you need to do?