ConvincingMail - Email Marketing SoftwareConvincingMail
 
Email Marketing Software

Welcome Guest Search | Active Topics | Members | Log In | Register

Configure AACE without 'search' button? Options · View
Tino Mclaren
Posted: Wednesday, June 10, 2009 9:31:32 AM
Rank: Newbie
Groups: Member

Joined: 6/10/2009
Posts: 2
Points: 6
Location: uk
Hello Mikhail

At the moment I have a textBox and a 'search' button plus of course the AACE on the textBox

At present the user must press the 'search' button (onClick) to run a little code in the code behind which refs the textBox.Text which then performs a search.

Im wondering if there is any way to have this (or indeed any) code behind run when the user clicks on a suggestion or hits return on a suggestion, sort of its own onClick method? similar to the standard ACE that ships with AjaxControlToolkit.

Many Thanks

Tino



trooper
Posted: Wednesday, June 10, 2009 12:20:49 PM
Rank: Administration
Groups: Administration

Joined: 11/18/2007
Posts: 73
Points: 131
Hi,
do you mean that you want to call a button click (and post back the page) when the user selects an item from the suggestions list?

Thanks
Mikhail
Tino Mclaren
Posted: Wednesday, June 10, 2009 2:15:46 PM
Rank: Newbie
Groups: Member

Joined: 6/10/2009
Posts: 2
Points: 6
Location: uk
Yes thats right Mikhail

Cheers

Tino
trooper
Posted: Thursday, June 11, 2009 3:02:54 PM
Rank: Administration
Groups: Administration

Joined: 11/18/2007
Posts: 73
Points: 131
Hi Tino
That is possible.
You need to use something like this:

js code include on the page
Code:

<script language="javascript" type="text/javascript">
function State_OnSelect(sender, item){
    __doPostBack($(<%=UpdateButton.ClientID%>).id,'');
}
</script>


this is the control

Code:

<cc1:AdvancedAutoSuggestExtender TargetControlID="StateTextBox" ServiceUrl="~/Suggestions.asmx/StateSuggest"
            OnClientItemSelected="State_OnSelect" ID="StateAASE" runat="server" />
<asp:ImageButton ImageUrl="http://www.convincingmail.com/i/bullet_go.gif" ID="UpdateButton" runat="server" />


I never tested this code but it should work fine ;)

Thanks
Mikhail
Users browsing this topic
Guest


Forum Jump
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.

Main Forum RSS : RSS

Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.052 seconds.