OP has solved this himself.
protected void CheckBoxList1_DataBound(object sender, EventArgs e)
{
string tooltip = string.Empty;
foreach (ListItem chk in CheckBoxList1.Items)
{
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
{
using (SqlCommand cmd = new SqlCommand())
{
try
{
cmd.Connection = con;
cmd.CommandText = "SELECT * FROM Stud_Table WHERE Name='" + chk.Text + "'";
con.Open();
SqlDataReader rd = cmd.ExecuteReader();
while(rd.Read())
tooltip = rd[0].ToString() + Environment.NewLine + rd[1].ToString() + Environment.NewLine + rd[2].ToString();
chk.Attributes.Add("title", tooltip);
}
catch (Exception ex)
{
string error_message = ex.Message;
Response.Write("<script LANGUAGE='JavaScript'>alert('" + error_message + "')</script>");
}
finally
{
con.Close();
}
}
}
}
}