注册 登录
编程论坛 ASP.NET技术论坛

viewstate的问题

wyl1168 发布于 2008-09-18 07:06, 758 次点击
get
{
return WiewState["PaymentMethodText"] !=null ?(string)Viewstate["PaymentMethodText"] :"PaymentMethod"
}
这一句是什么意思呀,请详细解释一下谢谢
2 回复
#2
wggfcusmq2008-09-18 08:11
检测视图变量PaymentMethodText是否存在,存在返回PaymentMethodText的值,不存在既返回"PaymentMethod";
#3
hebingbing2008-09-18 10:18
三目运算符“ ?:”的基本用法……
1