Regardis this, I would use a diferent Aproach to this issue. Actually I'm using it.
Declare your webusercontrol WITHEVENTS on your webpage. On your webusercontrol, declare an event, and raise it, instead of calling a method on your page.
Capture the event on your page, and process it.
Example:
On WebUserControl
Public Event DoAction(Action as Integer)
On page:
Private Withevents MyControl as MyControlClass = Nothing
Private Sub MyControl_DoAction(Action as integer) Handles MyControl.DoAction
Select Case Index
Case 0
' Do something
Case 1
' Do another
End Select
End Sub
Or you can of course define an event for each action individually. That may be a better option. The ideia is the same, but with an event for each action.
Hope ths helps
Regards,
João Cardoso
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only