tags:

views:

790

answers:

4

Hello, I have an asp:ImageButton that is supposed to popup a save dialog when clicked. When I put it outside the UpdatePanel, it works fine, but when I put it inside the UpdatePanel, the dialog does not popup.

+1  A: 

Response.Write often doesn't work inside of UpdatePanels. Assuming you're just running some javascript in the onclick event on the client, you're probably better off just adding your javascript code server-side to the OnClientClick property.

Robert C. Barth
A: 

I had a similar problem in a GridView, but solved it by uing an Image inside a LinkButton. http://netpl.blogspot.com/2008/01/imagebutton-in-templatefield-does-not.html for more information.

Echilon
A: 

txtmail.Attributes.Add("onkeydown","if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('"+Ibtnsend.UniqueID+"').click();return false;}} else {return true}; ");

onkeydown="submitOnEnter(this.Form1.Ibtnsend)"

A: 

Are you calling UpdatePanel.Update() after showing the popup?

Simes