G
Griff
I'm thinking about creating a "navigation tool" control for a web site.
The idea is that individual users will only be allowed access to certain
parts of the site, so:
User A should see options for [catalog] [search]
User B should see options for [catalog] [search] [budget]
etc, etc.
So...the question in my mind is whether the navigation control should:
a) encapsulate the code for identifying the user and working out for
itself which options to show
b) the code for identifying the user should be page based and dictate to
the control through public methods/properties what should be shown.
I suspect that the former makes more sense as the code is written just once,
but all the examples I've seen so far expose this control to the user
page...if the control is on several pages then this code has to be
replicated.
If someone could suggest what is the preferred method...
Thanks
Griff
Oh, and PS - I presume that a pre-compiled server control is also preferred
to a user control?
The idea is that individual users will only be allowed access to certain
parts of the site, so:
User A should see options for [catalog] [search]
User B should see options for [catalog] [search] [budget]
etc, etc.
So...the question in my mind is whether the navigation control should:
a) encapsulate the code for identifying the user and working out for
itself which options to show
b) the code for identifying the user should be page based and dictate to
the control through public methods/properties what should be shown.
I suspect that the former makes more sense as the code is written just once,
but all the examples I've seen so far expose this control to the user
page...if the control is on several pages then this code has to be
replicated.
If someone could suggest what is the preferred method...
Thanks
Griff
Oh, and PS - I presume that a pre-compiled server control is also preferred
to a user control?