开发者

VB.NET Click Handler Error

I have the following code:

CType(epuc, PropSoftware.SimpleUIControls.GenericPaymentControl).clickEvent = New EventHandler(AddressOf BtnAccept_Click)

and the following handler

Public Sub BtnAcc开发者_JS百科ept_Click(ByVal sender As Object, ByVal e As EventArgs)

But when I click the button, I'm not getting any response...which means the click event is not being triggered. Any idea why?


You need to use AddHandler.

http://msdn.microsoft.com/en-us/library/7taxzxka(v=vs.80).aspx#Y158

or WithEvents + Handles

http://msdn.microsoft.com/en-us/library/6k46st1y(v=VS.90).aspx


Use Addhandler:

AddHandler CType(epuc, PropSoftware.SimpleUIControls.GenericPaymentControl).clickEvent, AddressOf BtnAccept_Click
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜