Here is an example of how to access the management server side and apply your data to them. Be sure to add RunAt = "server" in the div tag.
add a link for the ItemDataBound event
rptList.ItemDataBound += rptList_ItemDataBound; private void rptList_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e) { if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem) return; HtmlControls.HtmlGenericControl RepeaterBG = (HtmlControls.HtmlGenericControl)e.Item.FindControl("RepeaterBG"); Data.DataRowView dr = (Data.DataRowView)e.Item.DataItem; RepeaterBG.Style.Add("background-color", dr("ContentBackground")) }
You will find that if you do this for ALL of your controls, instead of using "<% # Eval", it will be much easier for you to maintain the code.
source share