HI I am new for asp.net I want the exactlly https://www.aspsnippets.com/Articles/ASPNet-Pass-or-Send-GridView-Row-Values-to-other-Page-with-HyperLink.aspx in this link but one thing want to replace is what, instead of the dummy data used in
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Id"), new DataColumn("Name"), new DataColumn("Country") });
dt.Rows.Add(1, "John Hammond", "United States");
dt.Rows.Add(2, "Mudassar Khan", "India");
dt.Rows.Add(3, "Suzanne Mathews", "France");
dt.Rows.Add(4, "Robert Schidner", "Russia");
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
instead of the dummy data used in , how to fetch from the data base ?