ConvincingMail - Email Marketing SoftwareConvincingMail
 
Email Marketing Software

Welcome Guest! To enable all features please try to register or login.
Configure AACE without 'search' button?
Tino Mclaren
#1 Posted : Wednesday, June 10, 2009 4:31:32 AM(UTC)
Rank: Newbie

Groups: Member
Joined: 6/10/2009(UTC)
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
#2 Posted : Wednesday, June 10, 2009 7:20:49 AM(UTC)
Rank: Administration

Groups: Administration
Joined: 11/18/2007(UTC)
Posts: 92
Points: 188
Man

Was thanked: 2 time(s) in 2 post(s)
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
#3 Posted : Wednesday, June 10, 2009 9:15:46 AM(UTC)
Rank: Newbie

Groups: Member
Joined: 6/10/2009(UTC)
Posts: 2
Points: 6
Location: uk

Yes thats right Mikhail

Cheers

Tino
trooper
#4 Posted : Thursday, June 11, 2009 10:02:54 AM(UTC)
Rank: Administration

Groups: Administration
Joined: 11/18/2007(UTC)
Posts: 92
Points: 188
Man

Was thanked: 2 time(s) in 2 post(s)
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
Rss Feed  Atom Feed
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.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.5 RC1 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.055 seconds.