J
James Page
Hi all
Have a problem setting a button’s click event.
The button is in a DetailsView row which is nested within a Gridview.
I need to set its click event to pass a value held in a label within the
same row and pass that value to a function.
I have no problems referencing the controls using:
Dim id as string
Dim dl As DataList = row.FindControl("DataList1")
For Each l As DataListItem In dl.Items
Dim ctlBtn As Button = l.FindControl("btn1")
Dim ctlLbl As Label = l.FindControl("label1")
id = ctlLbl.Text
Next
But how do i set the click event and do somthing meaningful with the code??
Any ideas?
Thanks
Have a problem setting a button’s click event.
The button is in a DetailsView row which is nested within a Gridview.
I need to set its click event to pass a value held in a label within the
same row and pass that value to a function.
I have no problems referencing the controls using:
Dim id as string
Dim dl As DataList = row.FindControl("DataList1")
For Each l As DataListItem In dl.Items
Dim ctlBtn As Button = l.FindControl("btn1")
Dim ctlLbl As Label = l.FindControl("label1")
id = ctlLbl.Text
Next
But how do i set the click event and do somthing meaningful with the code??
Any ideas?
Thanks