and in my design page i have a textbox and dropdown value
i want to change the ddl to employee name according to empcode typing in textbox
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Oct 8, 2013, 9:05 PM EDT
protected void txtEmployeeCode_TextChanged(object sender, EventArgs e)
{
ListItem item = ddlEmployee.Items.FindByText(txtEmployeeCode.Text);
if (item != null)
{
ddlEmployee.Items.FindByText(txtEmployeeCode.Text).Selected = true;
ModalPopUp.Show();
}
else
Response.Write("");
}
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Oct 8, 2013, 1:26 AM EDT
textbox textchanged event just assign the textbox value to selectedvalue ofthe dropdownlist.
plz share your code what you did . i will modify if required.
mohammed shamsheerRank #4,152 · 361 reputationPosted Oct 8, 2013, 3:23 AM EDT
The textbox resides on modalpopup so its disappear and have to comes again and my another problem is i can't change my datavalue in to emp code be bcz on insertion i need emp id.
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Oct 8, 2013, 3:57 AM EDT
1st get the details of employee and bind it to drop down.
in textfield "employee name" and in value field "employee id"
mohammed shamsheerRank #4,152 · 361 reputationPosted Oct 8, 2013, 8:39 PM EDT
mohammed shamsheerRank #4,152 · 361 reputationPosted Oct 9, 2013, 2:13 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Oct 9, 2013, 2:16 AM EDT
happy coding