TargetControlID="txtAutoComplete" MinimumPrefixLength="1" CompletionInterval="10"
EnableCaching="true" UseContextKey="false" CompletionSetCount="12">
And Here Is MY WebService:
[WebMethod]
//[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public List
{
List
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("" + dr[1].ToString() + "");
result.Add(dr[1].ToString());
// result.Equals(dr["moviename"].ToString());
/// result.Add(dr["year"].ToString());
}
return result;
}
Can Anyone help me?
Raj BandiPosted May 4, 2013, 11:45 PM
Check the following first
1) Have you enabled webservices post and get for your asmx service. if not enable them with the below code inside system.web of your web.config(by default they are disabled)
Note: to check whether this causing, test in chrome. if you are getting an error 500 with message request format is unrecognized blah blah ..
2) Have you added ScriptService attribute to your asmx service class? if not add it
3) Change your service method signature as below
public List
Cheers,
Raj
saravana kumarPosted May 6, 2013, 1:51 AM
Now Its Woking..
Cheers..