简体   繁体   中英

Could not find attribute 'onmousedown' VB.net

Why does Visual studio give this message in the task list when I use "onmousedown" on an asp:button:

Could not find attribute 'onmousedown' of element button

Surely it does exist. After all, it works! The same thing happens for "onmouseup"

Is there a way to suppress these messages?

According to MSDN those aren't valid attributes on an asp:Button tag: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.aspx#DeclarativeSyntax

So how does it work? Not sure, I guess it is inheriting them from WebControl or Control.

Is there a good reason why you can't use Click or Command handlers (OnClick="MethodName" or OnCommand="MethodName")?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM