Hi,
It show's this error .Parameterized Query '(@id1 nvarchar(4000))select particulars,orderno,quantity,perpric' expects parameter @id1, which was not supplied.please do the needful.
SqlConnection con1 = new SqlConnection("data source=mars-104;initial catalog=marsweb;integrated security=true");
SqlCommand cmd1 = new SqlCommand("select particulars,orderno,quantity,perprice,amount from tbl_report1 where invoiceid=@id1", con1);
cmd1.Parameters.AddWithValue("@id1", id1);
SqlDataAdapter da1 = new SqlDataAdapter(cmd1);
DataTable dt1 = new DataTable();
da1.Fill(dt1);
if (dt1.Rows.Count > 0)
{
GridView2.DataSource = dt1;
}
else
{
MessageBox.Show("no record found");
}
Best,
Sudheep.