protected void rptRate_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { BettingRate rate = e.Item.DataItem as BettingRate; DropDownList tmpDdlHomeN = e.Item.FindControl("ddlHomeN") as DropDownList; DropDownList tmpDdlHome = e.Item.FindControl("ddlHome") as DropDownList; DropDownList tmpDddlVisitingN = e.Item.FindControl("ddlVisitingN") as DropDownList; DropDownList tmpDddlVisiting = e.Item.FindControl("ddlVisiting") as DropDownList; ListItem item = tmpDdlHome.Items.FindByValue(TNHelper.GetFloatValue(rate.HomeRate).ToString()); if (item != null) { item.Selected = true; } item = tmpDdlHomeN.Items.FindByValue(TNHelper.GetIntValue(rate.HomeRate).ToString()); if (item != null) { item.Selected = true; } item = tmpDddlVisitingN.Items.FindByValue(TNHelper.GetIntValue(rate.VisitingRate).ToString()); if (item != null) { item.Selected = true; } item = tmpDddlVisiting.Items.FindByValue(TNHelper.GetFloatValue(rate.VisitingRate).ToString()); if (item != null) { item.Selected = true; } } }