I am trying to alter the text in a asp:TextBox from a DataList with
protected void DataList7_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
TextBox tb = (TextBox)e.Item.FindControl("txtActivitate");
txtActivitate.Text = "Activitate: " + tb.Text;
}
}
html
.......
but the change is not happening to the control "txtActivitate". How it should look like?

Marius VasilePosted Aug 15, 2024, 8:44 AM
I found the solution with