初学者的问题,在线,及时结帐,绝对不拖拉~~
就是把下面代码该一下:
<%#(((DataRowView)Container.DataItem)[ "Admin_level "]) %> 如果等于1的话显示高级 如果等于2的话显示普通。。这个怎么做~~~
<asp:Repeater ID= "rpt_admin " runat= "server ">
<HeaderTemplate>
<table width= "703 " border= "1 " align= "center " cellpadding= "0 " cellspacing= "0 ">
</HeaderTemplate>
<ItemTemplate>
<td>
<span class= "edit_admin_text ">
<%#(((DataRowView)Container.DataItem)[ "Admin_level "]) %> ---就是这儿如果前面这个值等于1,就显示高级,如果等于2就显示普通---
</span>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
------解决方案--------------------到.cs里写判断 然后输出
------解决方案-------------------- <asp:Label ID= "lbl " CssClass= "td " Runat= "server " ForeColor= "#ff0000 ">
<%# tzTitle(DataBinder.Eval(Container.DataItem, "id ").ToString())%>
</asp:Label>
public string tzTitle(string s)
{
string filter = " ";
if(s == "1 ")
filter = "[高级] ";
else
filter = "