Question

How can i determine in a web server control (inherited from linkbutton) if an event handler is set for OnClick or OnCommand?

I rather not override the events and set variables... etc

Thanks all in advance

Was it helpful?

Solution

Inside Page_Load or after:

if (ctrl.OnClick != null)
{
    // ...
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top