C# – LinkButtons not working in ASP.net/C# app production deployment

asp.netc++

Hi all I'm running into a situation where link buttons are not responding on a gridview control in one of my apps deployed on a production machine. Not sure exactly what's going on.

The problem is very similar to this one although I've examined the output html on the page and it looks reasonable. Any thoughts/suggestions would be greatly appreciated.

Best Solution

If these LinkButtons are being dynamically created as part of the DataBinding of the gridview, they must also be re-created during the postback.

Page_load fires before the linkbutton click event does, and if after page_load is complete that same link button has not been re-created there is no event hooked up as the link button does not exist at that time, and the click event won't fire.

Related Question