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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -