Adding a second button if the first button is clicked

Discussion in 'ASP .Net Building Controls' started by Dave Prout, Jun 8, 2004.

  1. Dave Prout

    Dave Prout Guest

    Hi

    I build my form dynamically in Page_Load, with a button

    If the user clicks the button I want to create another button. I can do this but the button_click event doesn't seem t
    fire. I've been working on this for days, so any help would be greatly appreaciated

    Thank

    Dav

    UK
     
    Dave Prout, Jun 8, 2004
    #1
    1. Advertising

  2. "Dave Prout" <> wrote in message
    news:D...
    > Hi,
    >
    > I build my form dynamically in Page_Load, with a button.
    >
    > If the user clicks the button I want to create another button. I can do

    this but the button_click event doesn't seem to
    > fire. I've been working on this for days, so any help would be greatly

    appreaciated.

    Instead of creating the button when the first one is clicked, how about
    creating both buttons to start with, then setting the second one visible
    when the first is clicked.

    This avoids tricky issues with creating controls dynamically, primary among
    them the fact that you need to create the same controls, in the same order,
    both on the initial request, and on every postback.
    --
    John Saunders
    johnwsaundersiii at hotmail
     
    John Saunders, Jun 8, 2004
    #2
    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. =?Utf-8?B?T2JpIE9iZXJvaQ==?=

    Submit_click event fires only the first time the button is clicked

    =?Utf-8?B?T2JpIE9iZXJvaQ==?=, Sep 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    619
    Kevin Spencer
    Sep 1, 2005
  2. Mossman
    Replies:
    0
    Views:
    854
    Mossman
    Dec 12, 2005
  3. Janet Collins
    Replies:
    0
    Views:
    1,167
    Janet Collins
    Jan 13, 2006
  4. albert kao
    Replies:
    1
    Views:
    2,077
    marisa lee
    Apr 10, 2010
  5. yelipolok
    Replies:
    4
    Views:
    292
    John W. Krahn
    Jan 27, 2010
Loading...

Share This Page