Instead of handling OnClick event for the button, handle ItemCommand event
for the datalist:<asp:DataList
OnItemCommand="Item_Command"><ItemTemplate><asp:Button CommandName="XXX"
/></ItemTemplate></asp:DataList>
and in the code behind:
void Item_Command(Object sender, DataListCommandEventArgs e)
{
if (e.CommandName == "XXX")
string label = (e.Item.FindControl("labelD") as Label).Text;
}

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
> So, I have DatalistA on my form; it is rebinding with a refreshed datasetB
> after each post back.
[quoted text clipped - 5 lines]
>
> Thank for your help!
Regan - 12 Mar 2008 02:54 GMT
Thanks Eliyahu =)
I appreciate the help. I will explore this soon.
> Instead of handling OnClick event for the button, handle ItemCommand event
> for the datalist:<asp:DataList
[quoted text clipped - 17 lines]
>>
>> Thank for your help!