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;
- }

Subin ThomasPosted Feb 25, 2019, 1:22 AM
Salman BegPosted Feb 25, 2019, 1:17 AM
Subin ThomasPosted Feb 25, 2019, 1:10 AM
Salman BegPosted Feb 25, 2019, 1:01 AM
Subin ThomasPosted Feb 25, 2019, 12:57 AM
Salman BegPosted Feb 25, 2019, 12:38 AM
Subin ThomasPosted Feb 25, 2019, 12:21 AM
Madan ShekarPosted Feb 25, 2019, 12:03 AM
Salman BegPosted Feb 25, 2019, 12:01 AM
Subin ThomasPosted Feb 24, 2019, 11:54 PM
Madan ShekarPosted Feb 24, 2019, 11:44 PM