Link to home
Start Free TrialLog in
Avatar of arthrex
arthrexFlag for Germany

asked on

asp.net inline nested ternary

Hi everybody,

is it possible to nest a ternary inside an inline asp.net command?

<asp:TemplateField HeaderText="Speciality" SortExpression="DryLabTime">
                        <ItemTemplate>
                            <%#Eval("DryLabTime") == "Session1" ? "A" : 
                               (Eval("DryLabTime") == "Session2" ? "B" :
                               (Eval("DryLabTime") == "Session3" ? "C" :
                                (Eval("DryLabTime") == "Session4" ? "D" :
                                (Eval("DryLabTime") == "Session5" ? "E" :
                               "None"))))
                            %>
                        </ItemTemplate>
 </asp:TemplateField>

Open in new window


Thanks for your help
ASKER CERTIFIED SOLUTION
Avatar of Aaron Jabamani
Aaron Jabamani
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial