Im Using MS Visual Studio 2005 Profesional Edition with C#. I have a page that has two(2) drop down lists. The first drop down contains info that when selected will influence the results in the second drop down list. When the info from the second drop down list is clicked it will then display information in a Grid View.

I am connecting to a MSSQL server to get the options for the drop down lists and GridView.

How would I depending on the selection from the first drop down be able to influence what is displayed in the second drop down? Then how would I display information depending on the second drop down in the grid view?

Any pointers, hints or info about this problem is greatly apreciated.

You'd probably want to do a postback when the first (and second) drop-downs change and update the next field accordingly. If you don't want it to refresh the whole page, you'd likely be looking at some AJAX.

Turns out that the second drop down is not dependant on the first.

Instead.

The gridview is dependant on both of the drop downs, either one or the other, is there a way that I could set up the Grid View so depending on either the first drop down or second drop down to display the infromation.

Lets say after there is a selection in the first drop down the Grid View Changes, and then I change something in the second drop down which couses the grid view to change once again but this time according to the second drop down.

I am thinking maybe something is trigered after the selection in one of the drop downs but I dont know how I would start on this as I am farily new to ASP.NET.

Any help on this would be apreciated.

I haven't really thought this through, but you could have handler for each of the drop downs to do a postback updating the grid view as necessary.

This article has been dead for over six months. Start a new discussion instead.