Welcome Guest Search | Active Topics | Sign In | Register

imagebutton as acceptbutton in dialog Options
stever
Posted: Thursday, October 8, 2009 6:58:53 PM
Rank: Member
Groups: Member

Joined: 3/9/2009
Posts: 25
Dear Support,

When I use an imagebutton as the acceptbutton on a dialog it does not postback. When I use a normal button though it works fine. This is a real show stopper for me as I have a huge site and all navigation is by asp:imagebuttons rather than asp:buttons.

Here is a mock up of my code any workaround would be very greatly appreciated.

Thanks for your great support

<%@ Register TagPrefix="eo" NameSpace="EO.Web" Assembly="EO.Web" %>

<HTML>
<HEAD>
</head>
<body>
<form runat="server" onsubmit="alert(1);">


<% Response.Write(Now.ToString)%>
<eo:Dialog runat="server" id="xxxx" AcceptButton="SchBtnSearch" AcceptButtonPostBack="true" ActivateOnClick="true" OffsetY="-130" Width="900" InitialState="visible" VerticalAlign="Top" ControlSkinID="None" HorizontalAlign="Center" CloseButtonUrl="00020440" AllowResize="false">
<HeaderStyleActive CssText="cursor:pointer;"></HeaderStyleActive>
<ContentTemplate>

<asp:TextBox id="test" runat="server"></asp:TextBox>
<asp:ImageButton id="SchBtnSearch" runat="server" AlternateText="Search" CausesValidation="False"/>

</ContentTemplate>
</eo:Dialog>
</form>
</body>
</html>
eo_support
Posted: Friday, October 9, 2009 9:14:56 AM
Rank: Administration
Groups: Administration

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

We have tested your code and it works fine at here though. Have you tried it in a separate blank project?

Thanks!
stever
Posted: Friday, October 9, 2009 10:21:49 AM
Rank: Member
Groups: Member

Joined: 3/9/2009
Posts: 25
yes I just created a new one. Dropped the code exactly as above into the page (removing everything else) and ran it. It did exactly the same again? The EO Version is 6.0.63.2 could it be that?
eo_support
Posted: Friday, October 9, 2009 10:34:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Yes. It could be. Please try to update to the current version from our download page first.

Thanks
stever
Posted: Friday, October 9, 2009 10:37:21 AM
Rank: Member
Groups: Member

Joined: 3/9/2009
Posts: 25
Hi I have just tested it on the latest version and it still does the same. Version 7.0.27.2
stever
Posted: Friday, October 9, 2009 10:39:58 AM
Rank: Member
Groups: Member

Joined: 3/9/2009
Posts: 25
Sorry as usual I think I may have not been 100% clear (it was lat last night). The Imagebutton does postback if I click it but not if I hit enter. If it is a normal button though it works 100% as I would like. I m sorry for not being more clear.

stever
Posted: Friday, October 9, 2009 10:46:18 AM
Rank: Member
Groups: Member

Joined: 3/9/2009
Posts: 25
I can do but to be honest All the code I have in the project is as above - with the exception of adding the web reference. Did yours work when you had an image button, had focus on the text box and you clicked enter? (not clicking the button with the mouse)
eo_support
Posted: Friday, October 9, 2009 10:54:12 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
It does not but you are probably chasing a ghost here. Associating enter key with a button is not something clearly spelled out in the standard and different browsers can implement it different ways, especially when multiple buttons are present, then it can get really messy. A more reliable solution for you is to handle the dialog's ClientSideOnAccept client side event and then trigger any logic (including a post back) you would like inside your event handler.

Thanks
stever
Posted: Friday, October 9, 2009 11:08:52 AM
Rank: Member
Groups: Member

Joined: 3/9/2009
Posts: 25
I do appreciate you taking the time to look at this and please dont give up on me just yet :-)

My users are all internal on internet Explorer and I have tried the approach you suggested but it did not fire the event correctly at the backend as has been reported in a couple of the other posts. Also the admin users can associate a different button over time.

To be 100% honest if it could work like the asp:button it would be amazing. We are 100% happy with the toolset and if cant be done we may even be prepared to do it as a little bit of bespoke development. But I dont want to go to my boss just yet until im 100% sure - he may just spit his dummy out :-)

I just dont understand why it doesnt work like the standard ASP:Button?


eo_support
Posted: Friday, October 9, 2009 11:48:35 AM
Rank: Administration
Groups: Administration

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

ClientSideOnAccept as shown in the other post should work for you.

We understand that everyone wants our product to work 100% the way they would like but in reality that is just not possible. In order to make a solid product, we have to have a boundary first. We can not change/extend the product three times a day for each user so that it works exactly the way they wanted. Otherwise for one, there is no way for us to satisfy everyone for sure because everybody wants different things; for two, there would be no way for us to make a solid product at all. Thus unless an issue is clearly black and white, or an obvious overlook, or a dead end without any possible workaround/compromise at all, we will try to evaluate the situation over time and then decide what to do. This includes a lot of situations such as “another product works this way, why can’t yours work this way too?”, “It will be really nice if it works this way, why not?”. Such feedbacks are very valuable and we do appreciate them very much, but at the same time it is also not possible for us always change the product or devise a solution to work exactly your way because we have to maintain a solid product.

If you have any question regarding ClientSideOnAccept, please reply in the other thread. We will be happy to assist you on that.

Thanks for understanding.
stever
Posted: Friday, October 9, 2009 12:01:56 PM
Rank: Member
Groups: Member

Joined: 3/9/2009
Posts: 25
I do understand 100%. having spent a while reading around the answer (and this may be a quick winner for yourselves as well) is to create an imagebutton control which overrides the standard one and implements the IButtonControl. This is the reason it doesnt work for an imagebutton. That way it will work - silly Microsoft - aways with the unfinished stuff.


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.