S
smyersm
I have a back and next button that fire to move along a list.
On Page Load:
get the list from the server
assume active item is from the session
everything loaded
On button click:
receive event from back/next
replace active item with real active item
save new index to session
the control automatically renders the children controls.
I'm using a standard LinkButton element with 'addHandler'
On default i load 1 linkbutton, when it's clicked i want 4 link buttons
to show up. When one of those 4 is clicked, i want to say "hey, you
clicked item#"
Let's show some code:
Protected Overrides Sub CreateChildControls()
loadDefaultOrder()
End Sub
Private Sub loadDefaultOrder()
Response.Write("loading default sessioned order")
cmdList.addLink("default")
AddHandler cmdList.Click, AddressOf handle_itemClick
actionContainer.Controls.Add(cmdList)
End Sub
Private Sub updateRealOrder()
Response.Write("loading actual clicked order")
cmdList.addLink("test1")
cmdList.addLink("test2")
AddHandler cmdList.Click, AddressOf handle_itemClick
End Sub
Private Sub navPane_Click(ByVal Index As Short) Handles
navPane.Click
updateRealOrder()
End Sub
All items in "loadDefaultOrder" always work, they throw events. (yay).
All items in "updateRealOrder" show up on the screen, but don't throw
events.
Thoughts? Isn't it possible to create a number of controls based upon
postback information?
Thanks!
On Page Load:
get the list from the server
assume active item is from the session
everything loaded
On button click:
receive event from back/next
replace active item with real active item
save new index to session
the control automatically renders the children controls.
I'm using a standard LinkButton element with 'addHandler'
On default i load 1 linkbutton, when it's clicked i want 4 link buttons
to show up. When one of those 4 is clicked, i want to say "hey, you
clicked item#"
Let's show some code:
Protected Overrides Sub CreateChildControls()
loadDefaultOrder()
End Sub
Private Sub loadDefaultOrder()
Response.Write("loading default sessioned order")
cmdList.addLink("default")
AddHandler cmdList.Click, AddressOf handle_itemClick
actionContainer.Controls.Add(cmdList)
End Sub
Private Sub updateRealOrder()
Response.Write("loading actual clicked order")
cmdList.addLink("test1")
cmdList.addLink("test2")
AddHandler cmdList.Click, AddressOf handle_itemClick
End Sub
Private Sub navPane_Click(ByVal Index As Short) Handles
navPane.Click
updateRealOrder()
End Sub
All items in "loadDefaultOrder" always work, they throw events. (yay).
All items in "updateRealOrder" show up on the screen, but don't throw
events.
Thoughts? Isn't it possible to create a number of controls based upon
postback information?
Thanks!