Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...AJAX Autocomplete does not pop up?AJAX Autocomplete does not pop up?
Previous
 
Next
New Post
4/11/2011 7:53 AM
 

Hi there,

I try to implement AJAX Toolkit "asp:AutoCompleteExtender" function in DNN 560 (VS2008) C#.  I'm adding the Scriptmanager ScriptReference in  page load programmatically (looked at sample on http://adefwebserver.com/dotnetnukehe...

But

the issue is the Autocomplete function is not showing the pull-down menu, it even doesn't hit the breakpoints in functions. I copied the autocomplete function code from ajax.asp.net, which is working fine but I think I couldn't get fix the integration with DNN.

So the AUTOCOMPLE.ASMX code is native code from ASp.AJAX.NET which works fine... It prompts when you type 2 or more charachers in textbox

I've also added Breakpoints to see whether the code is hit, but the code-behind code is not hit. 

Is there something wrong with ServicePaht or whatever?????


Please advice?





-----------------------------------------------

Agenda_View.ASCX.CS code

-----------------------------------------------

 

protected void Page_Load(object sender, System.EventArgs e)

{

 if (DotNetNuke.Framework.AJAX.IsInstalled()){

  DotNetNuke.Framework.AJAX.RegisterScriptManager();

  ScriptManager objScriptManager = ScriptManager.GetCurrent(this.Page);

  ServiceReference objServiceReference = new ServiceReference();

  objServiceReference.Path = @"~/DesktopModules/Agenda/AutoComplete.asmx";

  objScriptManager.Services.Add(objServiceReference);

}

-----------------------------------------------

AutoComplete.AsmX - CODE

-----------------------------------------------

///

[WebService(Namespace = http://tempuri.org/)]

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

[System.ComponentModel.ToolboxItem(false)]

// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.

[System.Web.Script.Services.ScriptService]

public class AutoComplete : System.Web.Services.WebService

{

   public AutoComplete()

 {

    System.Diagnostics.Debugger.Break();

 }

[WebMethod]

public static string[] GetCompletionList(string prefixText, int count)

{

  System.Diagnostics.Debugger.Break();

  if (count == 0)

 

 {

   count = 10;

 }

if (prefixText.Equals("xyz"))

 {

return new string[0];

}

 Random random = new Random();

  List<string> items = new List<string>(count);

  for (int i = 0; i < count; i++)

{

  char c1 = (char)random.Next(65, 90);

  char c2 = (char)random.Next(97, 122);

  char c3 = (char)random.Next(97, 122);

  items.Add(prefixText + c1 + c2 + c3);

}

return items.ToArray();

}

}

---------------------------------------------

Agenda_View.ASCX   DESIGN code

---------------------------------------------

<asp:TextBox runat="server" ID="myTextBox" AutoCompleteMode="Suggest" Width="350" />

<asp:AutoCompleteExtender runat="server" BehaviorID="AutoCompleteEx" ID="autoComplete1"   TargetControlID="myTextBox" ServicePath="~/DesktopModules/Agenda_Invoer/AutoComplete.asmx"

  ServiceMethod="GetCompletionList" MinimumPrefixLength="2" CompletionInterval="1000"     EnableCaching="true"  CompletionSetCount="20"

  CompletionListCssClass="autocomplete_completionListElement"   CompletionListItemCssClass="autocomplete_listItem"   CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"

  DelimiterCharacters=";, :"  ShowOnlyCurrentWordInCompletionListItem="true">

</asp:AutoCompleteExtender>

 


















 

 
New Post
3/8/2012 4:20 PM
 

Hi , It works correctly , 

but I want have 2 text box that use autocomplete , when I do that , the second does not work !!!

Please help me ...

 
New Post
3/10/2012 10:55 AM
 

In the same page?

Try to change id's

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...AJAX Autocomplete does not pop up?AJAX Autocomplete does not pop up?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out