Note: Most probably this will be a double question, but since I haven\'t found a clear answer, I\'m asking it anyway.
In ASP.NET I\'d like to add some JavaScript to
I bumped into this recently where a control was being updated after the databind had taken place. The fix was to add the onchange javascript during the OnItemDatabound server event for the repeater involved:
protected void rptTarifDetails_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item)
{ TextBox proposedPrice = e.Item.FindControl("txtProposedUnitSell") as TextBox;
proposedPrice.Attributes.Add("onchange", "CalcCommissionSingleLine(this,'None','" + ((Repeater)sender).ClientID + "', false, " + rowCount.Value + ")");