Welcome Guest Search | Active Topics | Sign In | Register

eo:dialog Options
Always Learning
Posted: Monday, March 14, 2011 7:37:57 AM
Rank: Member
Groups: Member

Joined: 12/8/2009
Posts: 26
Hi There,

I am trying to add a cancel button to the footer of a dialog and I would like when the button is clicked to close the dialog as if I have pushed the ESC key.
How would I do that? I currently have:

<asp:ImageButton id="AcceptButton" runat="server" CausesValidation="true" ImageUrl="~/Images/dark_blue_dlg_ok.gif">
</asp:ImageButton>
<asp:ImageButton id="CancelButton" runat="server" ImageUrl="~/Images/dark_blue_dlg_cancel.gif">
</asp:ImageButton>

The ok button works fine but the cancel button causes a postback. When I push the ESC key no postback occures. I would like the cancel button to emulate that.

Thanks for your help,

Steve.
eo_support
Posted: Monday, March 14, 2011 3:59:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You will need to set the dialog's CancelButton to the ID of your button. Otherwise it is just a standard ASP.NET Button and it will do what a standard button does. Placing the button inside the dialog alone does not change the button's behavior.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.