I have a drop down list that is used to offer search choices to the user. I want to then display more controls when the user makes a choice. I want to do this for each of the possible choices.
Here is the code so far. Right now it is only writing the choice to a label. I want to add the new code to each of the case statements. How do I dynamically add the controls to the page for each of the choices?
1 protected void btnDisplay_Click(object sender, EventArgs e)
2 {
3
4 switch (ddlSearch.SelectedItem.Value)
5 {
6 case "Last Name":
7
8 lblDisplay.Text = Go to the complete details ...