Daily Archives: November 8, 2012

WOWZAPP preparation materials

wowzapp2012On November 9-10 thousands of developers are coming together in event venues worldwide to build apps for the next generation of Windows in WOWZAPP 2012. Many countries are joined to this event where experts, developers and trainers will be available to assist your learning and coding your apps. Check the nearest location on the WOWZAPP website and register!

Here is a quick list of articles I wrote in the last months that WOWZAPP attendees may found useful:

Windows Store

JavaScript development


Windows 8 inatallation

Good luck and have fun!


Technorati-címkék: ,,,

Zebrafying ListView without AlternatingItemTemplate

It’s a common task, that you have to create a table with zebra stripes on the webserver. This is quite easy in ASP.NET using the ListView control, because thanks to its ItemTemplate and AlternatingItemTemplate you can create separate row templates for the odd and the even rows. The drawback of this solution is that if the two templates have only minor differences, – for example just a single CSS class that sets the background color is attached to every second row – the code quickly becomes overcomplicated which is hard to maintain.

You can solve this problem with a single ItemTemplate, if you don’t hardcode, but instead calculate the CSS class of the row on the fly with data binding:

  <tr class="<%# Container.DisplayIndex % 2 == 0 ? "odd" : "" %>">

The same solution works with other controls as well, however you have to slightly modify the condition. For example if you use a Repeater you should use the Container.ItemIndex property to query the current row number.