Dynamic added user controls

PROKA

Well-known member
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 labels .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 doesnt change the label text.

If I load it on page_load, instead of the buttons Click event, it works.

I have never been familiar with aspns 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 dont appaer to have a definition for Panel1...

Code:
Protected WithEvents Panel1 As Web.UI.WebControls.Panel

Could this be the cause?

(Im afraid Im only using 2003, so I cant run your app).

Paul.
 

Similar threads

Back
Top