1

I have one checkbox control in Datalist Header and some controls in Item Template. On click of the "Submit" button in the page I should capture the state of controls from Datalist.

For Item template I can get the values from datalist.Items property.

How can I get the state of checkbox in "Header Template"?

4

1 回答 1

0

你可以使用这个:

CheckBox ch = (CheckBox) DataListID.Controls
    .OfType<DataListItem> ()
    .First (a => a.ItemType == ListItemType.Header)
    .FindControl("<CheckBoxID>");
于 2010-01-27T12:25:29.030 回答