SqlConnection con = Database.GetConnection(); SqlCommand cmd = new SqlCommand("spArticleCategoryWise", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@cat_id", cat_ID); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); DataTable dt = (DataTable)ds.Tables["spArticleCategoryWise"]; int totalrows = dt.Rows.Count; Label1.Text = totalrows.ToString();
Error:Object reference not set to an instance of an object.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)