First off, I am not wild about this code. I am posting it not just to help, but also in the hope someone will take this and do it right. My problems with this code are:
- This should inherit from DataControlField (or subclass) as we use it to tie a control to a column in a GridView. In this form we have to keep doing the asp:TemplateField, ... thing.
- How it adds to the onclick event is a major hack. It works but if LinkButton's code changes - then it won't. This is not safe programming! (But it works and I can't spend another half day doing this right.)
As always, please comment with suggestions, bugs, or if you write a better version.
Code: Download LinkImageButton.cs
Do you find this useful? If so please check out Windward Reports.
Comments