Jon,
Now I understand. Things are a bit less clear with the in-line coding.
If you don't use the ClassName attribute in your control
"myusercontrol.ascx", I think that the class is implicitly created as
ASP.myusercontrol_ascx
If you specify a class name, it will be
ASP.myspecifiedclassname
However, if you're unsure, you can load the control as an object, then
return its type with GetType as in
Dim myUserControl as Object = LoadControl("myFirstControl.ascx")
Response.Write(myUserControl.GetType.toString)
Once you know the type, you can change to
Dim myUserControl as ASP.myFirstControl =
LoadControl("myFirstControl.ascx")
AddHandler myUserControl.myCustomEvent, AddressOf Me.MyEventHandler
Bill
|