Hi
I have a dropdownlist that is populated from the database. It contains a list of departments. When a user selects department Production, I need a textbox to be displayed. So I need the dropdownlist to be passed to a function and then to javascript. Does anyone have any ideas how to check that department production has been selected?
code is;
<aspropDownList class="spoilageTxtBox" id="lstDepartments" runat="server" DataValueField="DeptID" DataTextField="Department" rows="1" OnSelectedIndexChanged="PopulateContacts" AutoPostBack="True"></aspropDownList>
Dim objDR as OleDbDataReader
objDR = objCmdDept.ExecuteReader()
if lstDepartments.SelectedValue = "Maintenance"
response.write ("You selected2 " & lstDepartments.SelectedItem.Text)
end if
lstDepartments.DataSource = objDR
lstDepartments.DataBind()
lstDepartments.Items.Insert(0, new ListItem("-- Select a Department --"))
Thanks
I have a dropdownlist that is populated from the database. It contains a list of departments. When a user selects department Production, I need a textbox to be displayed. So I need the dropdownlist to be passed to a function and then to javascript. Does anyone have any ideas how to check that department production has been selected?
code is;
<aspropDownList class="spoilageTxtBox" id="lstDepartments" runat="server" DataValueField="DeptID" DataTextField="Department" rows="1" OnSelectedIndexChanged="PopulateContacts" AutoPostBack="True"></aspropDownList>
Dim objDR as OleDbDataReader
objDR = objCmdDept.ExecuteReader()
if lstDepartments.SelectedValue = "Maintenance"
response.write ("You selected2 " & lstDepartments.SelectedItem.Text)
end if
lstDepartments.DataSource = objDR
lstDepartments.DataBind()
lstDepartments.Items.Insert(0, new ListItem("-- Select a Department --"))
Thanks