Hey there,
start working with .net 4.5.1 and AjaxControlToolkit (installed by Nuget).
I created an example but it won't work, there is no firing of the web method.
WebService File
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace AutoComplete
{
/// <summary>
/// Zusammenfassungsbeschreibung für AutoComplete
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// Wenn der Aufruf dieses Webdiensts aus einem Skript mithilfe von ASP.NET AJAX zulässig sein soll, heben Sie die Kommentarmarkierung für die folgende Zeile auf.
// [System.Web.Script.Services.ScriptService]
public class AutoComplete : System.Web.Services.WebService
{
[WebMethod]
public List<string> GetStates(string prefixText, int count)
{
List<string> states = new List<string>() { "Alaska", "Alabama", "California", "North Dakota" };
return states;
}
}
}
and the apsx
<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="AutoComplete._Default" %><asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"><asp:TextBox ID="txtStates" runat="server"></asp:TextBox><ajaxToolkit:AutoCompleteExtender ID="autoCompleteStates" runat="server"
DelimiterCharacters="" Enabled="True" TargetControlID="txtStates" ServiceMethod="GetStates"
MinimumPrefixLength="1" ServicePath="~/AutoComplete.asmx" CompletionInterval="200"></ajaxToolkit:AutoCompleteExtender></asp:Content>there no action, just nothing...
please help!