Grid With Hyper Link sample:

In GridView-Hyper-Link.aspx page:

<asp:GridView ID="gvProducts" runat="server" AutoGenerateColumns="false">
    <AlternatingRowStyle BackColor="green" />
    <Columns>
      <asp:HyperLinkField HeaderText="Name" DataTextField="PName" 
         DataNavigateUrlFields="pname" 
       DataNavigateUrlFormatString="Sales.aspx?pname={0}" />
      <asp:BoundField HeaderText="MinQty" DataField="MinOrdQty" />
      <asp:BoundField HeaderText="MaxQty" DataField="MaxOrdQty" />
      <asp:BoundField HeaderText="UnitPrice" DataField="UnitPrice" />
    </Columns>
    </asp:GridView>

In GridView-Hyper-Link.aspx.cs page:

public partial class ADO_DATACONTROLS_GridWithHyperLink : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string strcn = "Data source=your-sql-server-name;initial catalog=your-db-name;integrated security=sspi";
        SqlConnection cn = new SqlConnection(strcn);
        SqlCommand cmd = new SqlCommand("select pname,minordqty,MaxOrdQty,UnitPrice from dbo.products", cn);
        try
        {
            cn.Open();
            DataSet ds = new DataSet();
            SqlDataAdapter DA = new SqlDataAdapter(cmd);
            DA.Fill(ds);
            DataTable dt = ds.Tables[0];
            //Session["ds"] = ds;
            gvProducts.DataSource = dt;
            gvProducts.DataBind();

        }
        catch (SqlException ex)
        {

        }
        finally
        {
            cn.Close();
        }
    }
}

In Sales-Details.aspx page:

<asp:GridView ID="gvSales" runat="server"></asp:GridView>

In Sales-Details.aspx.cs:

public partial class ADO_DATACONTROLS_Sales : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["pname"] != null)
        {
            string productName = Request.QueryString["pname"].ToString();
            if (productName != null && productName != string.Empty)
                DisplaySalesDetails(productName);
        }
    }
    private void DisplaySalesDetails(string pname)
    {
        string strcn = "Data source=ADMIN-PC\\SQLEXPRESS;initial catalog=adomaterial;integrated security=sspi";
        SqlConnection cn = new SqlConnection(strcn);
        string qry=@"select * from dbo.sales where pid in(select pid from products 
        where pname='";
        qry+=pname+"');";
        SqlCommand cmd = new SqlCommand(qry,cn);
        try
        {
            cn.Open();
            DataSet ds = new DataSet();
            SqlDataAdapter DA = new SqlDataAdapter(cmd);
            DA.Fill(ds);
            Session["ds"] = ds;
            gvSales.DataSource = ds;
            gvSales.DataBind();

        }
        catch (SqlException ex)
        {

        }
        finally
        {
            cn.Close();
        }
    }
}

Tables in Data-base:

Products-table:

products-table

Sales-table:

sales-table