I am using ajax auto complete extender on a textbox and I am also using calender extender on other two textboxes and a jquery Image slider.But my autocomplete extender is not working . But when i use same code in new project it works well. My code on search control is :
<asp:Label ID="Label1" runat="server" Text="Desired Location you want to Search? "></asp:Label></label>
<asp:TextBox ID="txtSearch" runat="server" onfocus="if(this.value=='Type Location Here !') this.value='';"
onblur="if(this.value=='') this.value='Type Location Here !';" CssClass="txtbox"
Width="520px">Type Location Here !</asp:TextBox>
<asp:AutoCompleteExtender ID="autosearch" runat="server" TargetControlID="txtSearch"
ServiceMethod="GetCompletionList" CompletionSetCount="10" UseContextKey="true" ContextKey="SearchKey"
Enabled="true" EnableCaching="true" MinimumPrefixLength="1" CompletionInterval="100"
CompletionListCssClass="autocomplete_list" ScriptPath="SearchInputControl.ascx.cs"
CompletionListItemCssClass="autocomplete_listItem" CompletionListHighlightedItemCssClass="autocomplete_highlighted_listitem" >
</asp:AutoCompleteExtender>
Javascript error:
Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; AskTbTRL2/5.15.4.23821) Timestamp: Thu, 1 Nov 2012 06:59:14 UTC
Message: Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: type Line: 4620 Char: 12 Code: 0
looks like onfocus
and onblur
are your show stoppers. remove them and retry.
Basically, you can not directly add these events to asp.net textbox like this. use txtSearch.Attributes.Add('onfocus','jscode')
way to add these events.