TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yogita dhingra
NA
31
0
AutoCompleteExtender is not visible
Jul 28 2011 5:00 AM
AutoCompleteExtender is not visible. I m not geting any error also.
Here is my code
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="~/AutoComplete.asmx" />
</Services>
</cc1:ToolkitScriptManager>
<asp:TextBox ID="txtPartyName" runat="server" Width="150px"></asp:TextBox>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtPartyName"
EnableCaching="true" ServicePath="AutoComplete.asmx" ServiceMethod="GetPartyName"
MinimumPrefixLength="2" UseContextKey="false">
</cc1:AutoCompleteExtender>
AutoComplete.asmx
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Collections.Generic;
using System.Web.Script.Services;
using System.Data;
using Businesslogic;
[System.Web.Script.Services.ScriptService]
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
public class AutoComplete : System.Web.Services.WebService
{
[WebMethod]
public string[] GetPartyName(string prefixText)
{
Businesslogic.BLInquiry objInq;
objInq = new BLInquiry();
//MySQLConnection con = new MySQLConnection();
// string qry = "SELECT column_name FROM table_name WHERE column_name LIKE '%" + prefixText + "%' ";
DataSet ds = new DataSet();
ds = objInq.GetPartyName(prefixText);
string[] items = new string[ds.Tables[0].Rows.Count];
int i = 0;
try
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
items.SetValue(dr["PartyName"].ToString(), i);
i++;
}
}
catch (Exception err)
{
throw err;
}
return items;
//i m getting all the item in array
}
}
Please tell me what's wrong with my code.
Reply
Answers (
5
)
Concurrent request in Ajax
Rich TextBox Control