You can only have 1 databinding expression ( <%# xxx %> ) so you have to concatenate it:
Text='<%# Eval("Views") + Eval("ViewsAll","({0})") %>'
or another way (which I personally prefer) is to let a code behing method deal with it:
Text='<%# FormatViews(Eval("Views"),Eval("ViewsAlL")) %>'
and then in code behind
protected string FormatViews(object views, object viewsAll)
{
return String.Format("{0} ({1})",views,viewsAll);
}
Tuesday, January 27, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment