DataTable dtcount = dal.GetDataTable("select count(*) as counter from ABC where id='" + Request.QueryString["pid"] + "'");
if (dtcount.Rows.Count > 0)
{
Chart1.Height = new System.Web.UI.WebControls.Unit(Convert.ToDouble(dtcount.Rows[0]["counter"].ToString())*50,System.Web.UI.WebControls.UnitType.Pixel);
}
else
{
Chart1.Height = new System.Web.UI.WebControls.Unit(0, System.Web.UI.WebControls.UnitType.Pixel);
}
Chart1.Width = new System.Web.UI.WebControls.Unit(700, System.Web.UI.WebControls.UnitType.Pixel);
:)Enjoy