I got the value from the previous page but i am not able to query the databsase to get rows with string id
string id = Request.QueryString["custid"];
DataTable da = new DataTable();
using (SqlConnection conn = new SqlConnection(strConnString))
{
string strQuery = "SELECT * FROM LoanMaster where custId=@custId";
SqlCommand cmd = new SqlCommand(strQuery);
SqlCommand insert = new SqlCommand(strQuery, con);
insert.Parameters.AddWithValue("@custId", id);
using (SqlDataAdapter sda = new SqlDataAdapter())
{
cmd.Connection = con;
conn.Open();
sda.SelectCommand = cmd;
sda.Fill(da);
GridView2.DataSource = da;
GridView2.DataBind();
}
}