Background:
We are writing a new task for the ArcGis Explorer, this task needs to place images on the globe using its X,Y coordinates.While for each instance on the globe we need to render its details as html.
Mission:
Rendering the objects to html, we are still didn't find the right place (on the server or on the client), but let assume that they both need to do the same job.
Ideas:
1: var items = new List<string> {"Shani", "Doron", "Nati", "Yossi"};
2: var sb = new StringBuilder();
3: items.ForEach(currentItem =>
4: sb.AppendFormat("<li>{0}</li>", currentItem)
5: );
6: string data = sb.ToString();
1: var templateFolder = new StringTemplateGroup("SimpleLoopTemplate", @"\TemplateEngineTestCase\WinApp");
2: var template = templateFolder.GetInstanceOf("3_simpleLoop");
3: //here we are binding our list to the template
4: template.SetAttribute("items", new List<string> {"Shani", "Doron", "Nati", "Yossi"});
5: var data = template.ToString();
1: $items: {num1|
2: <li>$num1$</li>
3: }$
4: $end$
Conclusion:
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.