PDA

View Full Version : Access controls placed in Datalist


manjeet799
05-18-2006, 06:14 AM
Hi,

I have placed datalist on the form and one label box in the item template.
I want to access the value of label on the page load. Can anybody give me the solution to access the label control.

Do i need to bind the datalist here???

Regards

manjeet799
05-29-2006, 10:36 AM
Can anybody provide answer to the question.

I have label control placed in item template in datalist.
i want to set the text property of label at run time

handshakeit
05-29-2006, 12:53 PM
What do you want to do ?
U can access tha label at the time of item created

protected void DataList1_ItemCreated(object sender, DataListItemEventArgs e)
{
Label l = e.Item.FindControl("id_of_label");
}


Explain ur requirement completly........
then it will easy to help u :)