I think that the error occurs because you execute the query before you have a value for Request["department"].
The simplest solution is to have two pages, one with the first dropdown list and the other with the second dropdown list.
When you choose the department in the first list, the form submission redirect to the other page where the second list is populated with the members of the choosen department.
GmGregori
Contributor
5446 Points
735 Posts
Re: Cascading Selectboxes from Database
Feb 21, 2012 03:40 PM|LINK
I think that the error occurs because you execute the query before you have a value for Request["department"].
The simplest solution is to have two pages, one with the first dropdown list and the other with the second dropdown list.
When you choose the department in the first list, the form submission redirect to the other page where the second list is populated with the members of the choosen department.