Retrofitting ASP.NET WebForms themes to an old application I have a need to theme an <input> tag such that the JavaScript click event is different for each theme. I replaced with tag with an asp:Button, only to disciver that the OnClientClick property is not themeable.
Can anyone suggest a workaround for this?
ThemeableButton
You have to create a simple class that derived from
Button. Then override theOnClientClickproperty and add aThemeableattribute to as follows.Web.Config
Now, you have to replace the old button with new one. Change the
pagessection as follows.