C
chris martin
I have a server control that needs to be rendered upon meeting certain conditions
that our HTML people can alter.
This works fine if the multiple conditions do not rely on each other. But,
there are some situations that require that some conditions rely on one another.
An easy example should point out what I'm getting at.
ex.
[works just fine]
if user has function "customer service"
render.
<company:Item runat="server" RequiredUserFunction="CustomerService" />
[can't figure out a 'clean' way to do this]
if user has function "customer service" AND (partner == 32 OR partner == 67)
render.
<company:Item runat="server" RequiredUserFunction="CustomerService" PartnersToShowItem="32,67"
/>
The problem with the second example is that what if I need to change the
'OR' to an 'AND' in the partners list? What what if I need to change the
'AND' to an 'OR' between 'RequiredUserFunction' and 'PartnersToShowItem'
properties?
Does anyone have any ideas of how I can *cleanly* express such logic for
a server control?
Thank You,
Chris Martin
that our HTML people can alter.
This works fine if the multiple conditions do not rely on each other. But,
there are some situations that require that some conditions rely on one another.
An easy example should point out what I'm getting at.
ex.
[works just fine]
if user has function "customer service"
render.
<company:Item runat="server" RequiredUserFunction="CustomerService" />
[can't figure out a 'clean' way to do this]
if user has function "customer service" AND (partner == 32 OR partner == 67)
render.
<company:Item runat="server" RequiredUserFunction="CustomerService" PartnersToShowItem="32,67"
/>
The problem with the second example is that what if I need to change the
'OR' to an 'AND' in the partners list? What what if I need to change the
'AND' to an 'OR' between 'RequiredUserFunction' and 'PartnersToShowItem'
properties?
Does anyone have any ideas of how I can *cleanly* express such logic for
a server control?
Thank You,
Chris Martin