D
Dude
Below is the code - it is finding the control, and there is no error,
just not assigning the text to the label
<aspataList id="dlGoals" runat="server"
onEditCommand="myListEditHandler"
onUpdateCommand="myListUpdateHandler"
onCancelCommand="myListCancelHandler"
onDeleteCommand="myListDeleteHandler"
DataKeyField="ID">
<ItemTemplate>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td><asp:ImageButton runat="server" commandname="edit"
ImageUrl="/stap/images/arrow.jpg"
ID="Imagebutton1"></asp:ImageButton></td>
<td colspan="2"><asp:label id="LabelGoals"
runat="server"></asp:label>
<asp:label id="Label1" runat="server"><%# DataBinder.Eval
(Container.DataItem, "description")%></asp:label></td></tr></table>
</ItemTemplate>
</aspataList>
Label lblLabel = ((Label) e.Item.FindControl("LabelGoals"));
Trace.Write ("Target Label: " + lblLabel.ClientID);
lblLabel.Text = "dude";
just not assigning the text to the label
<aspataList id="dlGoals" runat="server"
onEditCommand="myListEditHandler"
onUpdateCommand="myListUpdateHandler"
onCancelCommand="myListCancelHandler"
onDeleteCommand="myListDeleteHandler"
DataKeyField="ID">
<ItemTemplate>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td><asp:ImageButton runat="server" commandname="edit"
ImageUrl="/stap/images/arrow.jpg"
ID="Imagebutton1"></asp:ImageButton></td>
<td colspan="2"><asp:label id="LabelGoals"
runat="server"></asp:label>
<asp:label id="Label1" runat="server"><%# DataBinder.Eval
(Container.DataItem, "description")%></asp:label></td></tr></table>
</ItemTemplate>
</aspataList>
Label lblLabel = ((Label) e.Item.FindControl("LabelGoals"));
Trace.Write ("Target Label: " + lblLabel.ClientID);
lblLabel.Text = "dude";