Hi,
Partial Class _Default
Inherits System.Web.UI.Page
Private Sub pageLoad(ByVal sender As Object, ByVal args As System.EventArgs) Handles Me.Load
Dim calledType As Type = Type.GetType("_Default")
calledType.InvokeMember("test", BindingFlags.InvokeMethod Or BindingFlags.Public, Nothing, Me, Nothing)
End Sub
Public Sub test()
Response.Write("Success")
End Sub
----------------------------------------------------
I am trying to call a public method using the above way but I could only achieve to call shared methods using flags public and static and nothing as an argument.
Thanks
Partial Class _Default
Inherits System.Web.UI.Page
Private Sub pageLoad(ByVal sender As Object, ByVal args As System.EventArgs) Handles Me.Load
Dim calledType As Type = Type.GetType("_Default")
calledType.InvokeMember("test", BindingFlags.InvokeMethod Or BindingFlags.Public, Nothing, Me, Nothing)
End Sub
Public Sub test()
Response.Write("Success")
End Sub
----------------------------------------------------
I am trying to call a public method using the above way but I could only achieve to call shared methods using flags public and static and nothing as an argument.
Thanks