I have a Gridview control within a control.  I have another control with a DetailView inside the

The Gridview populates an SQL query using an SQL Datasource, and I have the "Enable Selection" option checked in the smart tag of the Gridview.  I also have the DataKeyNames listed.

The DetailsView has another SQL Datasource that will display results needed when the Gridview Selected Option is clicked.  I have Select Parameters listed in the DetailView SQL Datasource that links to the Gridview when selected.

Problem is when I select the value in the Gridview, my page reloads however the DetailsView does not populate.  My code is listed below for the aspx page, and the code behind.  Any help would be greatly appreciated.

ASPX PAGE


 
 
 

    AutoGenerateColumns="False" BackColor="White"
  DataSourceID="SqlDataSource2" EnableModelValidation="True"
  Font-Size="Medium" ForeColor="Black" BorderColor="White" GridLines="None"
  style="text-align: center" Width="645px" DataKeyNames="FirstName,LastName"
  AutoGenerateSelectButton="True">
 
    SortExpression="FirstName" />
    SortExpression="LastName" />
    SortExpression="IsEnrolled" />
    SortExpression="IsApproved" />
    SortExpression="IsLockedOut" />
 
 
 
 
 

 

UpdateCommand="UPDATE aspnet_Membership SET IsApproved = @IsApproved, IsLockedOut = @IsLockedOut FROM aspnet_Membership INNER JOIN FranchiseAgent ON aspnet_Membership.UserId = FranchiseAgent.MembershipId WHERE (@MembershipId = aspnet_Membership.UserId)">
 
 
 
 
 


 
 
 





    ConnectionString="<%$ ConnectionStrings:CreditScoreTechs_BetaConnectionString %>" 
 
  SelectCommand="SELECT FranchiseAgent.FirstName, FranchiseAgent.LastName, FranchiseAgent.IsEnrolled, aspnet_Membership.IsApproved, aspnet_Membership.IsLockedOut FROM FranchiseAgent CROSS JOIN aspnet_Membership
  WHERE FranchiseAgent.FirstName = @FirstName OR FranchiseAgent.LastName = @LastName"
  onselecting="SqlDataSource1_Selecting">
 
    Name="FirstName"
  PropertyName="SelectedValue" />
    PropertyName="SelectedValue" />
 

 

    DataSourceID="SqlDataSource1" EnableModelValidation="True" Height="50px"
  Width="125px">
 

 



CODE BEHIND:

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MySite: System.Web.UI.Page
{
  protected void Page_Load(object sender, EventArgs e)
  {
  Gridview2.Databind();
  }
   
 
}