0

我想在 asp.net 中搜索返回名称和图像。因为我正在使用 AjaxControlToolKit,但它只返回名称而不是图像..

我的自动完成 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]
4

0 回答 0