0
votes

I have created a .ascx user control, with 5 buttons (Add,Edit,Delete,Save,Cancel) I want to create a Prerender Event for this control, accessible from the Parent Page, such that on postbacks in the Parent Page, I can Show/Hide some of these buttons dependant on a Session Variable. I have searched Google and DevEx, and don't see quite what I need.

1
I have edited your title. Please see, "Should questions include “tags” in their titles?", where the consensus is "no, they should not". - John Saunders
Thank you for the correction - noted - BFG

1 Answers

0
votes

You should avoid having the parent page reach too deeply into the child page. Instead, add some public bool properties to the user control. Have the parent page set these properties to indicate what should be made visible. Then your control can make them visible during the PreRender event of the control.