By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,710 Members | 1,613 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,710 IT Pros & Developers. It's quick & easy.

LinkButton click event in table

P: n/a
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)


Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
EMW
Use the Attribute part to add the OnClick event to your html code on each
button.

rg,
Eric
"Grant" <no****@nospam.com> schreef in bericht
news:e%****************@TK2MSFTNGP12.phx.gbl...
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)

Nov 18 '05 #2

P: n/a
EMW
Use the Attribute part to add the OnClick event to your html code on each
button.

rg,
Eric
"Grant" <no****@nospam.com> schreef in bericht
news:e%****************@TK2MSFTNGP12.phx.gbl...
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)

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.