Button Click Event into dynamic UserControl

L

Luca

HI,
I've a asp.net application that add a dynamic usercontrol with a
button. If i've tried to click it Click Event don't load.
But into a static usercontrol it's happens.
Anyone can help me?
 
J

Johan

If you add a new button make sure to register a event-handling method for
the click event.

Button1.Command += new CommandEventHandler(this.visa_click);

/Johan
 
L

Luca

i seen this scenario...
if i add usercontrol on page load sub, the event method of button work
fine.
But into my application the usercontrol display same information that
i have only after i have same information from database.
There's a method where could i modify a literal into usercontrol added
into page load????

Best Rgds
Luca
 
J

Jc Morin

Hi Johan

Any html can be customized from code-behind, just make it part of a html
know control such as <span> or <label>, and an id, runat="server" and you
can change it's value in the page load if you want.
 

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,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top