See if below code helps you:
private string supplierName = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
supplierName = Convert.ToInt32(Request.QueryString["SupplierName"].ToString());
if (!IsPostBack)
{
BindGridView();
}
}
private void BindGridView()
{
con.Open();
SqlCommand cmd = new SqlCommand("SELECT * FROM tblCategory where SupplierName=" + supplierName , con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
con.Close();
DataSet ds = new DataSet();
da.Fill(ds);
gridview1.DataSource = ds;
gridview1.DataBind();
}