问题描述
你好,
我正在开发一个小网站,现在我正面临着一个问题。我设计了我的Sql表,这样当我登录时,我将我的一个字段设置为1,当我退出时,它变为0。所以,我想设置一些控件的可见性,这样一些只有在我登录时才能看到。
我尝试使用这样的三元运算符:
< asp:LinkButton ID =LinkButtondeleterunat =serverCommandName =DeleteVisible =''<%#Eval(onlinestat)%>' '== 1?true:false>删除
但是,我收到了一个错误。有人请帮帮我..
提前感谢,
Ajay。
Hello,
i''m developing a small website n now i''m facing a problem. I designed my Sql table so that when ever I''m signed in, i set one of my field as "1" and when i log out, it changes to "0". So, I want to set some of the control''s visibility so that some should be visible only when I''m signed in.
I tried using ternary operator like this:
<asp:LinkButton ID="LinkButtondelete" runat="server" CommandName="Delete" Visible="''<%#Eval("onlinestat") %>''==1?true:false">Delete
But, I''m getting an error. Someone please help me out..
thanks in advance,
Ajay.
这篇关于包括HTML标签中的三元运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!