Meet a problem when I learning listview,
Now want to the effect of implementation is
.
.
Table Settings
Id kc_name km2 km3
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
123 test a 1 0
124 the examination room 2 0 0
Could you tell me how to write the aspx page and cs page code to judge?
CodePudding user response:
String kc_name=database table fieldString kc_name01=database table field
If (kc_name="1" | | kc_name01="1")
{
//normal
}
Else if (kc_name="0" and kc_name01="0")
{
//stop
}
The else
{
}
CodePudding user response:
Directly to the red part is modified to<% # Eval (" km2 "). The ToString ()=="0" & amp; & The Eval (" km3 "). The ToString ()=="0"? "Disabled", "normal" % & gt;
Remove KM2 and KM3 to 0 is disabled, the opposite of normal