Please insert following lines after this peice of code
DataRow[] rows = dSet.Tables[0].Select(" Date = '" + ct + "'");
if (rows.count <= 0)
{
StringBuilder cstext2 = new StringBuilder();
cstext2.Append("<script type=\"text/javascript\">");
cstext2.Append("alert('Data Not Found'};");
cstext2.Append("</script>");
RegisterClientScriptBlock(csname2, cstext2.ToString());
}