You mean to say you want some sort of cascade List boxfunctionality?
i.e. you have shown some DEPARTMENTs from your SQL server into a List Box
and now you want that based on what selection has been made in List Box
i.e. let's say "Accounts" department has been selected rom list box and you want to fetch data from sql database for that department.
Enable Autopostback property of the list box and make a database call similar to exisitng one in that Autopostback handler.
Try something like this :
<asp:listbox id="ListBoxA" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="ListBoxA_SelectedIndexChanged"></asp:listbox>
and codebehind :
protected void ListBoxA_SelectedIndexChanged(object sender, EventArgs e)
{
}