Button Click Event into dynamic UserControl

  • Thread starter Thread starter Luca
  • Start date Start date
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?
 
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
 
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
 
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.
 
Back
Top