I’ve always hated this aspect of ASP.NET. I know that you can replace LinkButtons with regular buttons, ensuring that a regular postback occurs using the ‘submit’ functionality of the input element. However, I’d rather shoot for a more graceful fall-through mechanism.
The code to do this is pretty straight-forward. All we need to do is modify the ItemDataBound event code to do some additional formatting of the LinkButtons in each bound item.
The biggest thing to watch out for here is the ClientID. The parameter for the __dopostback method requires an argument that represents the sender. I don’t know enough about this process to explain why, but I noticed by looking at the html source that this parameter is equivalent to the client id, replacing the underscore _ character with the dollar sign $.
I hope this has been helpful to SOMEONE out there! please feel free to send me your comments; I’d love to know how this approach can be improved!