I am trying to select a value from drop down list and if the value is NewDepartment then a text box should be visible for adding a new value and that value must be populated in the drop down list also if the user selects the new value then that value should also be stored into the database.
How can we do that?
I did write few lines of code but i am getting errors.My code goes here
Dim k As String If ddldept.SelectedItem = NewDepartment Then txtdept.Text = Visible k = txtdept.Text.ToString() ddldept.SelectedItem.Equals(k) End If
I am getting an error at NewDepartment saying that NewDepartment is not declared.
Any help is greatly appreciated.
Thanks in advance,