Dynamic added user controls

PROKA

Junior Contributor
Joined
Sep 3, 2003
Messages
249
Location
Bucharest
Ok so I have a user control with a button and a label. When you click the button, it writes something into the label's .text field. Nothing unusual up 'till now.

I load this control dynamically in a page, on a button_click event.

When I click the button in the control, it doesn't change the label text.

If I load it on page_load, instead of the button's Click event, it works.

I have never been familiar with aspn's postbacks and all...

Please help me, see attached files.


Later Edit: You may also use Ajax Extensions as a resolution for this.
 

Attachments

Last edited by a moderator:
You don't appaer to have a definition for Panel1...

Visual Basic:
Protected WithEvents Panel1 As Web.UI.WebControls.Panel

Could this be the cause?

(I'm afraid I'm only using 2003, so I can't run your app).

Paul.
 
Back
Top