views:

19

answers:

1

I want to print series in one cell of gridview sccording to condtiotion. I have used condition from ternary operator like

<%# Eval("Sequence").ToString()=="R" ? "Sequence1" : "Sequence2" %>

but i want to print series instead of string Sequence1 and Sequence2 by loop. Have any idea.

+1  A: 

You could, but it would get a bit messy as you would have to use something like a lambda expression to get a code block, as it has to end up being a single expression.

I suggest that you put the code in a method in your Page class, and call it from the expression.

Guffa