Multiple Conditions for Server Control

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top