Adding a second button if the first button is clicked

D

Dave Prout

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
 
J

John Saunders

Dave Prout said:
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.
 

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,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top