There are many ways and lot of articles available, if you searched in Google you will definitely get tons of articles on this requirement anyways the simplest way
private void BindGrid()
{
SqlConnection con =new SqlConnection("yourconnectionstring");
SqlCommand cmd=new SqlCommand("Select * from yourtablename",con);
con.open();
SqlDataAdapter da=new SqlDataAdapter();
DataSet ds=new DataSet();
da.SelectCommand=cmd;
da.Fill(ds);
Gridview1.DataSource=ds;
GridView1.Databind();
}
In your page load call as follows
If(!IsPostBack)
{
BindGrid()
}