dr["star"] // should be having some null/empty or non numeric values.
double value = 0; double.TryParse(dr["star"]+"" , out value); lbl_avg.Text = Math.Round(value,1).ToString();
TryParse
double
if (Double.TryParse(dr["star"].ToString(), out result)) { //Do the conversion }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)