Conditional Markup in aspx
- by Dynde
Hi...
I have a ListView. If I want to base the html markup on a condition in respects to the databound item, what would be the best way to do that?
What I mean is, is there any other way then putting <% % if/else blocks directly in the markup?
I'm aware that a really ugly way of doing it, is putting html markup in the database field, and just let the Eval() squeeze out the proper markup (I'm not doing that).
I would like to avoid putting actual <% % C# blocks in the code as well.
Any good ideas?