I want to check if there exist any record in the query.
So what I tried is
DataTable dtmkeylength = new DataTable("select count(lease_no) from XXACL_PROSPECTIVE_DATA_SAVE where mkey = " + Request.QueryString["userid"].ToString() + "");
if (dtmkeylength.Rows.Count > 0)
{
HidMode.Value = "M";
HidMKey.Value = dtmkeylength.Rows[0]["Mkey"].ToString();
}
The below datatable object has count of 2
records into the database, but still it is not going inside IF condition.
WHY ?