Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

autocompleter doesnt work in masterpage Site.Master

$
0
0

I have been trying to add an autocomplete extender to a textbox in the masterpage. If i add it to the underlying child page it works very well, but on masterpage it doesnt trigger the defined ServiceMethod. Here is my aspx page for masterpage:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="GUI.SiteMaster" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>

    <form runat="server">
    <div class="page">
        <div class="header">
            <div class="title">
                <h1>
                    Meine ASP.NET-Anwendung
                </h1>
            </div>
            <div class="loginDisplay">
                <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
                    <AnonymousTemplate>
                        [ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Anmelden</a> ]
                    </AnonymousTemplate>
                    <LoggedInTemplate>
                        Willkommen <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
                        [ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Abmelden" LogoutPageUrl="~/"/> ]
                    </LoggedInTemplate>
                </asp:LoginView>
            </div>
            <div class="clear hideSkiplink">
                <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
                    <Items>
                        <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Homepage"/>
                        <asp:MenuItem NavigateUrl="~/About.aspx" Text="Info"/>
                    </Items>
                </asp:Menu>
            </div>
        </div>
        <div>
            <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
            </ajaxToolkit:ToolkitScriptManager>
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <ajaxToolkit:AutoCompleteExtender
                ID="TextBox1_AutoCompleteExtender"
                runat="server"
                DelimiterCharacters=""
                Enabled="True"
                ServicePath=""
                ServiceMethod="GetCompletionList"
                TargetControlID="TextBox1"
                UseContextKey="True">
            </ajaxToolkit:AutoCompleteExtender>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:ImageButton ID="ImageButton1" runat="server"
                onclick="ImageButton1_Click" />
        </div>
        <div class="main">
            <asp:ContentPlaceHolder ID="MainContent" runat="server">
            </asp:ContentPlaceHolder>
        </div>
        <div class="clear">
        </div>
    </div>
    <div class="footer">
        
    </div>
    </form>
</body>
</html>

Site.Master.cs:

        [System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
        public static string[] KeywordSearchRequest(string prefixText, int count, string contextKey)
        {
            // Caution if session ends, static presenter is null
            Presenter.MarketplaceHost.ApplicationControllerSeviceClient ac = ApplicationController.WebserviceClient;
            ac.SearchKeywords(prefixText, count, contextKey);
            return null;
        }


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>