Yeah, I know it works and everything and I'm not worried about the efficiency of the code as much as the coding experience. I would just like to be able to do something like:
<% progressClass = MyFunctions.ProgressClass(Eval("NodeParentID"), Eval("NodeID"), CurrentUser.UserID); %>
<li class="lesson
<%# Eval("LessonType") %>
<%# IfCompare(DataItemIndex, 0, "", "first") %>
<%# IfCompare(DataItemIndex, DataRowView.DataView.Count-1, "", "last") %>
<%# progressClass %>
">
<%# IfCompare(progressClass, "disabled", "<a href=\""+GetDocumentUrl()+"\" class=\"wrap\">", "<div class=\"wrap\">") %>
<span class="title"><%# Eval("Title") %></span>
<span class="duration"><%# MyFunctions.FormatTime(Eval("Duration")) %></span>
<%# IfCompare(progressClass, "disabled", "</a>", "</div>") %>
</li>