LinkButton click event in table

G

Grant

Below is the code I am using to build the table using
system.web.ui.webcontrols.table. I am building a collection of link buttons
inside each cell. How do I know when the user clicks on the link button
because I do not have the click event? Thanks





Dim rowItem As TableRow
Dim cellItem As TableCell
Dim LnkItem As LinkButton
Dim x As Long

rowItem = New TableRow()
For x = 0 To 7
cellItem = New TableCell()
LnkItem = New LinkButton()
LnkItem.Text = x
cellItem.Controls.Add(LnkItem)
rowItem.Cells.Add(cellItem)
Next x

tbl.Rows.Add(rowItem)
 
E

EMW

Use the Attribute part to add the OnClick event to your html code on each
button.

rg,
Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top