Best Technique for Multiple Eval Fields in Gridview ItemTemplate?

Dhaust picture Dhaust · Sep 11, 2008 · Viewed 56.4k times · Source

What is the best way to use multiple EVAL fields in a GridView ItemTemplate?

Looking to have some control over formatting for appearance as well as setting up hyperlinks/javascript etc.

Answer

Forgotten Semicolon picture Forgotten Semicolon · Sep 11, 2008

Even clearer, IMO, is:

<%# String.Format("{0} - {1}", Eval("Name1"), Eval("Name2")) %>