Figure 2. Create a Better Solution With Code.
When you use Visual Studio's wizards to create an ASP.NET master/detail page, the data source that drives the details view depends on the SelectedValue property of the Master GridView to set a single parameter in the data source.