buttons in user control don't work.

georgepatotk

Contributor
Joined
Mar 1, 2004
Messages
432
Location
Malaysia
Dear all,
I am creating a user control (ascx) and this user control is embedded into an aspx. For your information, this ascx has few buttons.

It is so funny that if I add the ascx into the aspx in the programming time, it works just fine. But, if I add it dynamically during executin time, the buttons in the ascx dont' work.

Why, why, why.... can you tell me why???
 
georgepatotk said:
Dear all,
I am creating a user control (ascx) and this user control is embedded into an aspx. For your information, this ascx has few buttons.

It is so funny that if I add the ascx into the aspx in the programming time, it works just fine. But, if I add it dynamically during executin time, the buttons in the ascx dont' work.

Why, why, why.... can you tell me why???
Are you adding the user control to the Pages Controls property?
how about posting your dynamic User Control creation code?
 
As attached, anyone can tell me what is the problem??

Panel1 is actually a login ascx. Panel2 is Tabs (Functions available for certain users).

And panel3 is for the modules/functions interface.

It is a portal by the way.
 

Attachments

okok.. I will display the code here.
but I need to do some modification, cause it might to messy to paste everything here.

I will paste it shortly
 
Why I can't add two ASP:Button in a runat server form

I had figured out the problems.
It is because when I dynamically added th second button if a form (runat="server"), the added button won't work.

but, I still don't have the solution on how to cure this problem. Anyone can tell me, please.
 
I got the solution...
Actually the buttons work.
I just need to recreate the button everytime I post back my page.

Thanks for spending your time with me.
 
Back
Top