0

hi

I am using auto complete extender and it is not working in Web user Control . But Working in Web form Please give its solution ASAP.

Cs Code

[System.Web.Services.WebMethod]
    public static string[] GetSuggestions(string prefixText, int count)
    {
        MyDatabaseDataContext db = new MyDatabaseDataContext();
        return db.Movies
            .Where( m => m.Title.StartsWith(prefixText) )
            .OrderBy( m => m.Title )
            .Select( m => m.Title)
            .Take(count)
            .ToArray();
    }


<asp:TextBox  id="txtMovieTitle"  AutoComplete="off"  Runat="server" />
    <ajax:AutoCompleteExtender   id="ace1"
        TargetControlID="txtMovieTitle"
        ServiceMethod="GetSuggestions"
        MinimumPrefixLength="1"
        runat="server" />

Thanx

Edited by __avd: Added [code] tags.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Ramesh S
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.