views:

58

answers:

1

If I set a .ascx control's visible attribute to true, what event is called? What method can I create in that control's codebehind to act on this event?

Thanks :)

+1  A: 

No event is raised. But you can add a handler for the PreRender event and check there whether the control's Visible property is set to True or False.

M4N
Excellent, thanks a lot. I'm assuming PreRender is called every time the page renders anything, not just on post back?
Chris
You would have to post back to set the ascx property to visible so I'm not sure it matters.
brendan
My mind obviously hasn't started yet, hahah thanks a lot!
Chris