im trying to change the value inside my repeater: (via the itemdatabound event)
if year is empty - set value blabla
my repeater:
<ItemTemplate> <tr > <td > <%#Eval("year") %> </td>
my c # code:
void RPT_Bordereaux_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { if (string.IsNullOrEmpty(((DataRowView)e.Item.DataItem)["year"].ToString())) { (((DataRowView)e.Item.DataItem)["year"]) = "blabla";
it changes, but is not displayed in the repeater (the old value is displayed).
one solution is to add server control
or literal
(server runat) to itemTemplate
- and " findControl
" on the server - and change its value.
another solution - jQuery - to find the last empty TD.
but - my question is:
is there any other server side solution ()?
source share