Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am here simply trying to use Ajax:AutoCompleteExtender control from AjaxToolKit.
But its not working properly
The used codes are shown below
XML
<asp:TextBox runat="server" Width="110px" ID="txtSeat"
                           ontextchanged="txtPNR_TextChanged" AutoPostBack="true"
                           AutoCompleteType="Search"></asp:TextBox>
                       <Ajax:AutoCompleteExtender runat="server" ID="extender1"
                           TargetControlID="txtSeat" UseContextKey="True" servicepath="SeatAutoFill.asmx" ServiceMethod="GetCompletionList" MinimumPrefixLength="2" CompletionInterval="1000" EnableCaching="true"></Ajax:AutoCompleteExtender>


XML
[System.Web.Services.WebMethod]
        [System.Web.Script.Services.ScriptMethod]
        public static List<string> GetCompletionList1(string prefixText, int count)
        {
            string seat="";
            List<string> list = new List<string>();
            n_DBConnection dbcon = new n_DBConnection();

            DataTable dt = new DataTable();
            dt = dbcon.getDatatable("select * from Exam_SeatMappin where Seat='"+prefixText+"'+'%'");
            if (dt.Rows.Count > 0)
            {
                seat=(dt.Rows[0]["Seat"].ToString());
            }

            list.Add(seat);
            return list;
        }


AjaxToolKit is working properly b/c I used number of control (like popup control, Calender control, etc.)
On browser console it shown following exception
1.)Uncaught Sys.ScriptLoadFailedException: Sys.ScriptLoadFailedException: The script 'http://localhost:443/ScriptResource.axd?d=Wa9Weah3h2mr083ggFSzFhAAFlWTL088I…Icu3eB1fSG9UwKBSbKkV4b41gDrOPa841waJBpX_xbmjAi4Jy6fTD_dKcQWgQykH_XFHWo_WrG...<omitted>...)
2.)Uncaught TypeError: Cannot read property '_notified' of null

Please help me get out from it
Posted
Updated 14-Apr-14 2:01am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900