The database I'm using is used to keep a log of service calls to various companies. When the user inserts data, they choose the company from a static list, but the reference number is user-supplied. The data is brought back using a GridView.
I am trying to create two linked dropdownlists so that I can search the gridview (so that the items on the second dropdownlist are changed according to the
selection of the first dropdownlist). My problem is that whilst the first dropdown list are static (ie, using <asp:ListItem>), my second dropdown list is populated directly from the datasource, like so:
Expand|Select|Wrap|Line Numbers
- <asp:AccessDataSource ID="AccessDataSource3" runat="server"
- DataFile="~/App_Data/db.mdb"
- SelectCommand="SELECT DISTINCT [reference] FROM [tbl1]"></asp:AccessDataSource>
What I want to do is to pick a company from the first dropdown, and all the reference numbers that apply to the company areshown.
I know there are a hundred and one tutorials on the net on this, but all the ones I have found only deal with linked DDLs where both dropdownlists rely on static data.
I really don't know where to start on this! I haven't posted any of my code for this because, well, I haven't actually got any yet! Any help is appreciated - am using .Net 2.0, Visual studio 2005. I write in VB, but it's not like there aren't any code converters out there :)