HTML:
<ItemTemplate>
<asp:DropDownList id=Label5 runat="server" Text='dd(<%# DataBinder.Eval (Container.DataItem, "coEncrypt").ToString().Trim() %>)'>
<asp:ListItem Value="显示">加密</asp:ListItem>
<asp:ListItem Value="隐藏">不加密</asp:ListItem>
</asp:DropDownList>
</ItemTemplate>//str 不要管,
aspx: public string dd(string dd)
{
if(str=="http://")
return "<input type='Label' value='"+dd+"'>";
}
我想在str="http://"时返回一个Label控件,
但是我现在这样当str=="http://" 的时候没有一点效果,请大家帮帮忙 ,我搞了几天了`,``
<ItemTemplate>
<asp:DropDownList id=Label5 runat="server" Text='dd(<%# DataBinder.Eval (Container.DataItem, "coEncrypt").ToString().Trim() %>)'>
<asp:ListItem Value="显示">加密</asp:ListItem>
<asp:ListItem Value="隐藏">不加密</asp:ListItem>
</asp:DropDownList>
</ItemTemplate>//str 不要管,
aspx: public string dd(string dd)
{
if(str=="http://")
return "<input type='Label' value='"+dd+"'>";
}
我想在str="http://"时返回一个Label控件,
但是我现在这样当str=="http://" 的时候没有一点效果,请大家帮帮忙 ,我搞了几天了`,``
void Test()
{
if(str=="http://")
{
DropDownList ddl = ((DropDownList)e.Item.Cells[5].FindControl("Label4"));
ddl.Visible = fasle;
}
}另:提醒你,刚刚搞定的要结帐哦,呵呵。
http://community.csdn.net/Expert/topic/4926/4926778.xml?temp=.601391