Which one is recommended ? Let me explain what I want to achieve !
I have one pages used by many users, every user has a different Role like admin, operator, normal user.
When a client open that page I want to display a set of controls (buttons) which depends on their Role.
admin is allowed to do x and y, but a normal user is not allowed to do these actions.
In order to achieve what I want to do, which approach is the best one ?
Should I define all controls in HTML then toggle Visible property, or dynamically load needed controls ?
For Visible = false I'm worried about server processing time. Even if HTML markup is not sent to the client for a Visible = false control, I know that the control is still loaded by ASP .NET and maybe even processed, but his HTML result is not written to the output stream.
For dynamically loaded control, one inconvenient is that they need to be reinitialized on Postback, also there are some problems with events and postback.