ConvincingMail - Email Marketing SoftwareConvincingMail
 
Email Marketing Software

Welcome Guest! To enable all features please try to register or login.
Adding AutoCompleteExtender to dynamic TextBox
rsaouri
#1 Posted : Monday, February 09, 2009 6:13:01 AM(UTC)
Rank: Newbie

Groups: Member
Joined: 2/9/2009(UTC)
Posts: 2
Points: 6
Location: Morocco/France

Hi,
How can I add AutoCompleteExtender to Texbox created dynamiclly (on the fly) ?
I tried client side code and server side code but no way...

Thank you so much
trooper
#2 Posted : Tuesday, February 10, 2009 12:58:03 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 rsaouri,
I tried to add the textbox and the aace dynamicaly and it works fine.
I used this code:
Code:

        //dynamic textbox
    TextBox textBox = new TextBox();
        textBox.AutoCompleteType = AutoCompleteType.None;
        textBox.ID = "DynamicCity";
    AdvancedAutoSuggestExtender advancedAutoSuggestExtender = new AdvancedAutoSuggestExtender();
        advancedAutoSuggestExtender.TargetControlID = textBox.ID;
        advancedAutoSuggestExtender.ServiceUrl = "~/Suggestions.asmx/CitySuggest";
    advancedAutoSuggestExtender.UpdateField = "DCityTextBox";
        advancedAutoSuggestExtender.ID = "DCityAASE";
        advancedAutoSuggestExtender.AdditionalFields = "StateIdTextBox,CountyIdTextBox";
    DynamicCityTd.Controls.Add(textBox);
    DynamicCityTd.Controls.Add(advancedAutoSuggestExtender);


This is the same control as used in demo for the city.

Can you post your code or errors you get on your side?

Thanks
rsaouri
#3 Posted : Tuesday, February 10, 2009 9:22:59 PM(UTC)
Rank: Newbie

Groups: Member
Joined: 2/9/2009(UTC)
Posts: 2
Points: 6
Location: Morocco/France

Thank you for your reply.
In fact, my problem is with server side TextChanged event of my dynamiclly generated TextBox :
when this event is fired, the selected item in autocomplete list is replaced with the letters I typed to get this autocomplete list.
Perhaps I have to do something with PostBack event ? I don't know...

Excuse me for my bad english
trooper
#4 Posted : Wednesday, February 11, 2009 4:16:18 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,
Can you post your code here or send to me via support email?
Also it will be good to look at the problem in action.

Thanks
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
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.