请问ItemTemplate内的变量如何再加处理? e.g total * a
<ItemTemplate>
%#Container.DataItem("total")%>
</ItemTemplate>

解决方案 »

  1.   

    %#Container.DataItem("total")*a%> 
      

  2.   


    如何是字符串呢???<body>
    ..
    <%#Container.DataItem("string")%> 
    ..
    </body>这个会打印出apple,orange,banana
    我要分拆它.
      

  3.   

    <%
    Dim str As String
    str = Container.DataItem("string")
    %>
    这个有错误
    应该是怎样的?
      

  4.   

    在CS文件里写一个public型的函数来处理,假设为函数abc(参数)。前台:
    <ItemTemplate> 
    <%# abc(Container.DataItem("total"))%> 
    </ItemTemplate> 
      

  5.   

    <%# Eval("M_MoveNo")%>
    ///////////
    <ItemTemplate><%#Container.DataItemIndex+1 %></ItemTemplate>
      

  6.   


    正确的可以在前台页面写函数,放在
    <script runat="server">
    .........
    </script>
    或在后台cs文件里写