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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesautocompleteextender servicepathautocompleteextender servicepath
Previous
 
Next
New Post
11/2/2011 3:33 PM
 
Having difficulty with a simple autocompleteextender. The implementation is to pull db names but I have included a simple list for testing. Ajax is functioning on the page and I can get other controls to work but I assume there is some problem with the servicepath in use of this control in dotnetnuke. Please advise.


runat="server"
TargetControlID="TextBox1"
ServiceMethod="getWoList"
ServicePath="woAutoComplete.asmx"
CompletionSetCount="20"
DelimiterCharacters="|">


in the code
'prep dnn ajax
Try
If DotNetNuke.Framework.AJAX.IsInstalled Then
DotNetNuke.Framework.AJAX.RegisterScriptManager()
End If
Catch exc As Exception 'Module failed to load
ProcessModuleLoadException(Me, exc)
End Try

and


_
_
_
Public Class woAutoComplete
Inherits System.Web.Services.WebService

_
Public Shared Function getWoList() As String()
Return Split("Hello World|yelloKitty|helloDolly", "|")
End Function

End Class
 
New Post
11/3/2011 2:42 PM
 
Having difficulty with a simple autocompleteextender. The implementation is to pull db names but I have included a simple list for testing. Ajax is functioning on the page and I can get other controls to work but I assume there is some problem with the servicepath in use of this control in dotnetnuke. Please advise.



runat="server"
BehaviorID="AutoCompleteEx"
ID="autoComplete1"
TargetControlID="myTextBox"
ServicePath="AutoComplete.asmx"
ServiceMethod="GetCompletionList"
MinimumPrefixLength="2"
CompletionInterval="1000"
EnableCaching="true"
CompletionSetCount="20"
CompletionListCssClass="autocomplete_completionListElement"
CompletionListItemCssClass="autocomplete_listItem"
CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
DelimiterCharacters=";, :">



<%-- Make the completion list transparent and then show it --%>



<%--Cache the original size of the completion list the first time
the animation is played and then set it to zero --%>
Action Script="
// Cache the size and setup the initial size
var behavior = $find('AutoCompleteEx');
if (!behavior._height) {
var target = behavior.get_completionList();
behavior._height = target.offsetHeight - 2;
target.style.height = '0px';
}" />

<%-- Expand from 0px to the appropriate size while fading in --%>







<%-- Collapse down to 0px and fade out --%>








and in autocomplete.cs

using System;
using System.Collections.Generic;
using System.Web.Services;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class AutoComplete : WebService
{
public AutoComplete()
{
}

[WebMethod]
public string[] GetCompletionList(string prefixText, int count)
{
if (count == 0)
{
count = 10;
}

if (prefixText.Equals("xyz"))
{
return new string[0];
}

Random random = new Random();
List items = new List(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();
}
}

dnn version is 4.5.1
control is not set to support partial rendering as when I do, I get an error from pagemanager
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesautocompleteextender servicepathautocompleteextender servicepath


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