Hi,
I think that the best way would be to create a
custom transformation function. This function will work with the two parameter and your logic. Or ,it will output two parameters as you need.
So, you will be using it like now:
%%controlName?<%# CustomFunction("your paremeter1", "parameter2")%>%%
Best regards,
Juraj Ondrus