在自动填充文本框中返回带有名称的图像在asp.net中搜索ajaxcontroltoolKit

时间:2012-09-15 09:30:29

标签: asp.net

我希望在asp.net中搜索返回带图像的名称。因为我使用AjaxControlToolKit,但它只返回名称而不是图像..

我的autocomplete src代码就是这个

  [WebMethod]

public string[] GetCompletionList(string prefixText)
{



    SqlConnection conn = new SqlConnection("Data Source=sharedmssql.znetindia.net,1234;Initial Catalog=jobandhotel;User ID=jobnhotel;Password=-pl,0okm");




    cmd2 = new SqlCommand("SELECT * FROM  ManageUser_JobSeeker WHERE KeySkills like   '" + prefixText + "%' ", conn);


    cmd2.CommandType = CommandType.Text;


    DataSet ds=new DataSet();
    da = new SqlDataAdapter(cmd2);
    da.Fill(ds);
    if (ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)


    return default(string[]);


    List<string> items = new List<string>(ds.Tables[0].Rows.Count);
    foreach (DataRow row in ds.Tables[0].Rows)
    {



         items.Add(row["JobSeekerName"].ToString()+ "<img src='ram.jpg' height='10' width='10'/>");


    }
    return items.ToArray();

}![i want serch like this as in linkedlen,   please  provide me a source code if you can][1]

0 个答案:

没有答案