I have a select button(LinkButton
) inside the Repeater.When i select the button that row should be appear in ListView
control.But Repeater control does not support DataKey,then how can i achieve this?
views:
20answers:
1
+2
A:
You can have hidden field inside repeater and achieve your task as follows:
protected void SelectLink_Click(object sender, EventArgs e)
{
RepeaterItem item = (sender as LinkButton).Parent as RepeaterItem;
HiddenField hdnId = item.FindControl("hdnId") as HiddenField;
string id = hdnId.Value.ToString();// incase your id is string
//.....
}
Seshan
2010-10-26 12:06:22