Need to create buttons(that throw events) AFTER i receive an event from another button.

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!
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top