比如“10102022”转换成“二级管理员”显示出来?
解决方案 »
- .net cms 推荐
- asp.net ajax 读取另一页面数据 导致本页面无法操作
- 请问w3wp.exe的问题
- ASP.net中怎么实现DATAGRID的多行同时删除?
- 1.<asp:button>如何点击它就能链接到其他页面?2.Response.Redirect 和 Server.Transfer 有咩区别?
- asp.net2005,PasswordRecovery控件取回密码乱码如何解决?
- 如何從客戶端對Datagrid增加新行(不刷新)
- System.ArgumentNullException: 值不能为空
- flash生成的菜单引入到ASP.NET网页的问题
- 有两个关于口令的问题!!!!!!!
- 新手请教:如果我有两个文本框a,b,两个按纽x,y,点x按纽的时候验证a是否为空,点y按纽的时候验证b是否为空。怎么对应起来?
- 卡销售和DATALIST问题
select case when lie='10102022' then '二级管理员' end from tableorc:
select decode(lie,'10102022','二级管理员','') from table
{
return "二级管理" ;
}
select case when lie='10102022' then '二级管理员' end from tableorc:
select decode(lie,'10102022','二级管理员','') from table
也可以在grid事件中实现!
{
e.Item.Cells[yourposition].Text = "系统管理员";
}
else if (e.Item.Cells[yourpositon].Text == "1")
{
e.Item.Cells[yourposition].Text = "别的";
}3、使用模板列
前台:
<asp:TemplateColumn HeaderText="身份">
<ItemTemplate>
<asp:Label ID="p" Text='<%#zhuangtai_deal(DataBinder.Eval(Container.DataItem, "status").ToString())%>' Runat =server > //status是你数据库中表示权
</asp:Label> 限的字段
</ItemTemplate>
</asp:TemplateColumn>后台:
protected string zhuangtai_deal(string status)
{
if(status=="0")
return "系统管理员";
else
return "别的";
}