G
Guest
I have a series of dynamic link buttons created based upon a datareader. I've
added a click event and it calls the sub ok:
example: "while loop through the reader"
Dim ltrCtrl As New LiteralControl
Dim lbtnCtrl As New LinkButton
ltrCtrl.Text = "<br>"
lbtnCtrl.Text = "WE: " & dtrCal(10).ToString
lbtnCtrl.ToolTip = dtrCal(10).ToString & " these events"
& dtrCal(1)
lbtnCtrl.ID = "wecc" & i.ToString
lbtnCtrl.CommandName = "WS"
lbtnCtrl.CommandArgument = dtrCal(1)
AddHandler lbtnCtrl.Click, AddressOf cc_onClick
thsphcc.Controls.Add(ltrCtrl)
thsphcc.Controls.Add(lbtnCtrl)
"end"
I'm calling the sub (LOADBTNS) to create the linkbuttons in the page load sub.
I have a series of other non-dynamic link buttons that need to recreate the
dynamic linkbuttons by calling a query with a different value.
Is there a way to check in the page load to see if a specific event was
fired and therefore not call the LOADBTNS sub.
something like
if not me.lbtnNxt.[event fired]
Call LOADBTNS(CType(lblNow.Text, Date))
End If
or is there a different way to create dynamic buttons?
thanks
kes
added a click event and it calls the sub ok:
example: "while loop through the reader"
Dim ltrCtrl As New LiteralControl
Dim lbtnCtrl As New LinkButton
ltrCtrl.Text = "<br>"
lbtnCtrl.Text = "WE: " & dtrCal(10).ToString
lbtnCtrl.ToolTip = dtrCal(10).ToString & " these events"
& dtrCal(1)
lbtnCtrl.ID = "wecc" & i.ToString
lbtnCtrl.CommandName = "WS"
lbtnCtrl.CommandArgument = dtrCal(1)
AddHandler lbtnCtrl.Click, AddressOf cc_onClick
thsphcc.Controls.Add(ltrCtrl)
thsphcc.Controls.Add(lbtnCtrl)
"end"
I'm calling the sub (LOADBTNS) to create the linkbuttons in the page load sub.
I have a series of other non-dynamic link buttons that need to recreate the
dynamic linkbuttons by calling a query with a different value.
Is there a way to check in the page load to see if a specific event was
fired and therefore not call the LOADBTNS sub.
something like
if not me.lbtnNxt.[event fired]
Call LOADBTNS(CType(lblNow.Text, Date))
End If
or is there a different way to create dynamic buttons?
thanks
kes