R
RAM
Hi,
Could you help me please?
I have:
<aspataList ID="Materia³yDataList" runat="server"
OnEditCommand="Materia³y_Edit">
...
<EditItemTemplate>
...
<asp:Label ID="NumerEdit" runat="server" Text='<%#
DataBinder.Eval(Container.DataItem, "Numer" %>' />
...
</EditItemTemplate>
</aspataList>
And I try to access the asp:Label in Materia³_Edit():
proctected void Materia³y_Edit(object sender, DataListCommandEventArgs e)
{
string Numer = ((Label)e.Item.FindControl("NumerEdit")).Text; // HERE
PROBLEM
...
}
I have runtime error: FindControl returns null. I have checked: e.Item is a
DataListItem object with attibutes: DataItem=null, ItemIndex=0,
ItemType=Item. The problem occurs at each position of the aspataList.
DataBinding works correctly.
Could you help me?
/RAM/
Could you help me please?
I have:
<aspataList ID="Materia³yDataList" runat="server"
OnEditCommand="Materia³y_Edit">
...
<EditItemTemplate>
...
<asp:Label ID="NumerEdit" runat="server" Text='<%#
DataBinder.Eval(Container.DataItem, "Numer" %>' />
...
</EditItemTemplate>
</aspataList>
And I try to access the asp:Label in Materia³_Edit():
proctected void Materia³y_Edit(object sender, DataListCommandEventArgs e)
{
string Numer = ((Label)e.Item.FindControl("NumerEdit")).Text; // HERE
PROBLEM
...
}
I have runtime error: FindControl returns null. I have checked: e.Item is a
DataListItem object with attibutes: DataItem=null, ItemIndex=0,
ItemType=Item. The problem occurs at each position of the aspataList.
DataBinding works correctly.
Could you help me?
/RAM/