I’m new to asp.net. I’m trying to create two linked dropdownlist i.e if first one is changed then the content of the second list should change accordingly. Also, based on those selections I want to display a table of data(please suggest what to use listview,gridview or repeater). My database is in mysql.using c#
Share
Sentence “I’m newbie” doesn’t matter here, because principles are all the same. You want to create two linked dropdownlists. So do it.
What would you do then in php? You guess right, do an ajax call to the server.
Here you have multiple options to choose from. Since you’re comming from php background, I’d suggest using jquery.ajax to make the call. So you’d create the first dropdownlist with the values you need and hook the event using jquery, to handle when the user changes the selected value. Make the call using jquery to the web service with the selected value. You receive an answer from a webservice (search for tutorials, there are plenty of them on the web) and use the jquery again, this time to populate the second dropdownlist.