ASP.NET 1.1 hooking into Control.Init

K

Kevin Jackson

Is there any way to get a shot to hook into server controls on the page Init
event.

The following code doesn't work because it the page controls must of already
had their Init event called.

Protected Overrides Sub OnInit(ByVal e As EventArgs)

Dim s As String

If (ReportViewer Is Nothing) Then

s = "Not Initialized"

Else

s = ReportViewer.ID

AddHandler ReportViewer.Init, AddressOf ReportViewer_Init

AddHandler ReportToolbar1.Init, AddressOf ReportToolbar_Init

End If

MyBase.OnInit(e)

End Sub

Sub ReportViewer_Init(ByVal sender As Object, ByVal e As EventArgs)

End Sub

Sub ReportToolbar_Init(ByVal sender As Object, ByVal e As EventArgs)

End Sub
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top