【发布时间】:2014-04-30 16:48:29
【问题描述】:
我在 asp.net 文件后面的代码中有一个变量,比如 string myVariable = "SomeValue";
我在代码隐藏中使用了这个声明:
Public myVariable As String = "SomeValue"
我想把这个字符串绑定在中继器里面。
<td id="Td5" class="Text" style="text-align:right; width:70px;" >
<%#DataBinder.Eval(Container, "'<%=myVariable%>'", "{0:N2}")%>
</td>
Repeater 使用数据表绑定。我用vb.net
感谢你们的cmets。
【问题讨论】:
-
你应该可以做到
<%#DataBinder.Eval(Container, myVariable, "{0:N2}")%>
标签: asp.net vb.net datatable repeater