I ve been trying for the last 3 hours to get my autocompletetextbox working and tryed all sort of code. My Web service is working from wich I m actually fetching all the stuff but the jquery seems not to work, I m always getting the error when typing the first letter inside the textbox:

Here is the code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Fpz_simulation.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link rel="stylesheet" type="text/css" 
        /1.8/themes/base/jquery-ui.css" />

<script   type="text/javascript" src=

<script  type="text/javascript" src=
    <script type="text/javascript" >
        $(function () {
            $('#<%= txtStudentName.ClientID %>').autocomplete({
                source: function (request, response) {
                        url: "WebService1.asmx/GetNastavnik",
                        data: "{ 'searchTerm': '" + request.term + "' }",
                        type: "POST",
                        dataType: "json",
                        contentType: "application/json;charset=utf-8",
                        success: function (data) {
                        error: function (result) {
                            alert('There is a problem processing your request');
                minLength: 0
    <form id="form1" runat="server">

        <asp:TextBox ID="txtStudentName" runat="server"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />

I have also downloaded the jquery code and made a refference to it but that didn't work so I chose to get the code with the URL's above.

Edited by castajiz_2: NBIO

3 Years
Discussion Span
Last Post by nikkitata
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.