AutoCompleteExtender doesn't complete after postback Title is required

Last post 12-04-2009 3:02 AM by sara_23apr. 3 replies.

Sort Posts:

  • AutoCompleteExtender doesn't complete after postback Title is required

    09-23-2008, 1:11 PM
    • Participant
      1,763 point Participant
    • jstawski
    • Member since 12-10-2002, 3:44 PM
    • United States
    • Posts 376

    I found a bug with the AutoCompleteExtender and added the bug to the CodePlex Project. I know this forum is not the place to post bugs, but I just want to make people aware of it. Below is the link to the bug

    http://www.codeplex.com/AjaxControlToolkit/WorkItem/View.aspx?WorkItemId=18622

    Further research indicates that the focus javascript statement that ASP.NET generates executes before the AutoCompleteExtender is initialized:

    <script type="text/javascript">
    //<![CDATA[
    WebForm_AutoFocus('tb');Sys.Application.initialize();
    Sys.Application.add_init(function() {
        $create(AjaxControlToolkit.AutoCompleteBehavior, {"delimiterCharacters":"","id":"tb_AutoCompleteExtender","serviceMethod":"GetCompletionList","servicePath":"/DWHomeExchange/Default2.aspx","useContextKey":true}, null, null, $get("tb"));
    });
    //]]>
    You can avoid this by using the javascript ScriptManager pageLoad event to set focus which will happen after the Extender is initialized:
     
    ScriptManager.RegisterStartupScript(this, this.GetType(), "focus", String.Format("function pageLoad() {{document.getElementById('{0}').focus();}}", tb.ClientID), true);
     
    JoNaS
    MVP - Microsoft Most Valuable Professional
    MCAD - Microsoft Certified Application Developer
    http://www.jstawski.com
  • Re: AutoCompleteExtender doesn't complete after postback Title is required

    09-25-2008, 7:28 AM
    Hi,

    I have tested your issue report in the issue tracker. The issue can be reproduced and we appreciate your sharing of the solution. The AjaxControlToolkit team would check your report and feed back in that page.

    Thanks for your supporting of our forum and the AjaxControlToolkit.

    Best regards,

    Zhi-Qiang Ni
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
    Answer” if a marked post does not actually answer your question.
  • Re: AutoCompleteExtender doesn't complete after postback Title is required

    09-25-2008, 8:59 PM
    Answer
    • Participant
      1,763 point Participant
    • jstawski
    • Member since 12-10-2002, 3:44 PM
    • United States
    • Posts 376

    No problem.

    JoNaS
    MVP - Microsoft Most Valuable Professional
    MCAD - Microsoft Certified Application Developer
    http://www.jstawski.com
  • Re: AutoCompleteExtender doesn't complete after postback Title is required

    12-04-2009, 3:02 AM
    • Member
      70 point Member
    • sara_23apr
    • Member since 04-05-2006, 1:42 AM
    • Posts 103

     

    Thank you for the solution

    Sara

Page 1 of 1 (4 items)