asp.net - using Eval of ASP Listview as an inline CSS value -
my code :
<asp:listview id="lst1" runat="server"> <itemtemplate> <div style="width:<%#eval("rating")%>%"> </div> </itemtemplate> </asp:listview>
it works great, in visualstudio editor it's considered invalid. there way make valid?
i know can create whole ' style="width:xxx%" ' in eval i'm looking way.
<div style='<%# eval("rating", "width:{0}%") %>'></div>
it make accepted editor, don't know else though.
Comments
Post a Comment