Here's the scenario.
Our project uses a toolbar that is for the most part generic (ascx), however for specific modules that you enter some buttons are visible where other modules have different buttons that are visible. To handle this we are building the toolbar declaratively with all module specific Buttons hidden. Then in the Page_Load event we are setting the specific module buttons visibility to true. If a submodule is entered (just another aspx page) there's code that goes and hides some of the buttons that were set to visible true previously in the same Page_Load.
When the toolbar has a certain number or order of buttons removed (visibly they look correct) the server-side buttonclick event gets a nasty error. We have been trying to figure out if this is an ordering issue (of when we are creating/showing/hiding buttons) or because we are creating the toolbar declaratively and then modifying the visibility programmatically (assumed unlikely).
Any ideas would be greatly appreciated. Thank you!
Our project uses a toolbar that is for the most part generic (ascx), however for specific modules that you enter some buttons are visible where other modules have different buttons that are visible. To handle this we are building the toolbar declaratively with all module specific Buttons hidden. Then in the Page_Load event we are setting the specific module buttons visibility to true. If a submodule is entered (just another aspx page) there's code that goes and hides some of the buttons that were set to visible true previously in the same Page_Load.
When the toolbar has a certain number or order of buttons removed (visibly they look correct) the server-side buttonclick event gets a nasty error. We have been trying to figure out if this is an ordering issue (of when we are creating/showing/hiding buttons) or because we are creating the toolbar declaratively and then modifying the visibility programmatically (assumed unlikely).
Any ideas would be greatly appreciated. Thank you!