i have have taken project name and project code in a autocomplete textbox the code is given below when i type name it comes with respective code , i want to know how what is assigned in that textbox name or code because i want to give further function for code only
- [System.Web.Script.Services.ScriptMethod()]
- [System.Web.Services.WebMethod]
- public static List
GetSearch(string prefixText) - {
- DataTable dt = new DataTable();
- SqlConnection con = new SqlConnection(con_Vas);
- SqlCommand cmd = new SqlCommand("SELECT [Employee Name]+'; '+[Employee Code] as Name FROM [HRPLK].[dbo].[View_EmployeeBasicInformation] where [Employee Name] like '%'+ @EmpName +'%' ");
- cmd.Parameters.AddWithValue("@EmpName", prefixText);
- cmd.Connection = con;
- con.Open();
- List
employees = new List (); - using (SqlDataReader sdr = cmd.ExecuteReader())
- {
- while (sdr.Read())
- {
- employees.Add(sdr["Employee Code"].ToString());
- }
- }
- con.Close();
- return employees;
- }


Madan ShekarRank #428 · 5.9K reputationPosted Feb 24, 2019, 6:44 PM EST
Salman BegRank #284 · 8.8K reputationPosted Feb 24, 2019, 7:01 PM EST
Madan ShekarRank #428 · 5.9K reputationPosted Feb 24, 2019, 7:03 PM EST
Salman BegRank #284 · 8.8K reputationPosted Feb 24, 2019, 7:38 PM EST
Salman BegRank #284 · 8.8K reputationPosted Feb 24, 2019, 8:01 PM EST
Salman BegRank #284 · 8.8K reputationPosted Feb 24, 2019, 8:17 PM EST
Subin ThomasRank #724 · 3.2K reputationPosted Feb 24, 2019, 6:54 PM EST
Subin ThomasRank #724 · 3.2K reputationPosted Feb 24, 2019, 7:21 PM EST
Subin ThomasRank #724 · 3.2K reputationPosted Feb 24, 2019, 7:57 PM EST
Subin ThomasRank #724 · 3.2K reputationPosted Feb 24, 2019, 8:10 PM EST
Subin ThomasRank #724 · 3.2K reputationPosted Feb 24, 2019, 8:22 PM EST