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
saravana kumar
NA
31
46.1k
Ajax Auto Complete Extender not Working in master Page?
May 4 2013 4:51 PM
Here Is My HTML Code:
<ajax:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
<asp:TextBox ID="txtAutoComplete" ClientIDMode="Static" runat="server" />
<ajax:AutoCompleteExtender ID="AutoCompleteExtender1" Enabled="true" runat="server" DelimiterCharacters=""
ServicePath="Autocomplete.asmx" ServiceMethod="GetAutoCompleteData"
TargetControlID="txtAutoComplete" MinimumPrefixLength="1" CompletionInterval="10"
EnableCaching="true" UseContextKey="false" CompletionSetCount="12">
</ajax:AutoCompleteExtender>
And Here Is MY WebService:
[WebMethod]
//[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public List<string> GetAutoCompleteData(string Word)
{
List<string> result = new List<string>();
string connection = ConfigurationManager.ConnectionStrings["alayoosainews"].ConnectionString;
SqlConnection con = new SqlConnection(connection);
con.Open();
//SqlCommand cmd = new SqlCommand("select distinct moviename,year from moviedetails where moviename LIKE '%'+@SearchText+'%'", con);
// SqlCommand cmd = new SqlCommand("select moviename,year,charname from moviedetails,character where moviename like '%'+@SearchText+'%' and charid in( select item from fnSplit(listofcharacters,',') )", con);
SqlCommand cmd = new SqlCommand("GetSearchNews", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@lang", "ta");
cmd.Parameters.AddWithValue("@word", Word);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
// result.Add("<a href=NewsDetails.aspx?newsid=" + dr[0].ToString() + ">" + dr[1].ToString() + "</a>");
result.Add(dr[1].ToString());
// result.Equals(dr["moviename"].ToString());
/// result.Add(dr["year"].ToString());
}
return result;
}
Can Anyone help me?
Reply
Answers (
2
)
insert data in to all table in one form
C# 2010 code