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

Discussion in 'ASP .Net Web Controls' started by smyersm@gmail.com, Jul 7, 2005.

  1. Guest

    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!
     
    , Jul 7, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kerri
    Replies:
    2
    Views:
    13,044
    Kevin Spencer
    Oct 27, 2003
  2. Roger
    Replies:
    1
    Views:
    642
    GreggTB
    May 20, 2005
  3. Replies:
    15
    Views:
    7,579
    Roedy Green
    Sep 8, 2005
  4. wang xiaoyu
    Replies:
    0
    Views:
    867
    wang xiaoyu
    Jun 25, 2003
  5. Emanuele D'Arrigo

    To throw or to throw not?

    Emanuele D'Arrigo, Nov 14, 2008, in forum: Python
    Replies:
    6
    Views:
    324
    Emanuele D'Arrigo
    Nov 15, 2008
Loading...

Share This Page