events in usercontrol

W

William Newsom

Hello Newbie Here


I have a aspx page , i have a menu bar with items listed, I want the user
to click on an item and load that user control into a blank panel

i use this code

Dim myControl1 As LoginControl = CType(LoadControl("LoginControl.ascx"),
LoginControl)

Panel1.Controls.Add(myControl1)



inside the logincontrol i have a button to logon, that event doesnt fire at
all.



If i dont load the control dynamically but instead put a protected
withevents statement and just hide/show the control i get the event of
course.



in microsofts start ups they use controls 99% of the time dynamically loaded
and unloaded what is the code to do that if you dont want to hide/show a
bunch of user controls
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top