1 c# asp.net visual-studio-2015
我有一个ImageButton类型的对象.我还有以下代码:
LogManager.GetCurrentClassLogger().Log(LogLevel.Info, "###payWithVisa.Enabled ={0}; payWithVisa.Visible ={1}; canPayWithCard={2}", payWithVisa.Enabled, payWithVisa.Visible, canPayWithCard);
payWithVisa.Enabled = canPayWithCard;
payWithVisa.Visible = canPayWithCard;
LogManager.GetCurrentClassLogger().Log(LogLevel.Info, "payWithVisa.Enabled ={0}; payWithVisa.Visible ={1}; canPayWithCard={2}", payWithVisa.Enabled, payWithVisa.Visible, canPayWithCard);
Run Code Online (Sandbox Code Playgroud)
这是相应的日志条目:
2016-03-29 11:37:49.1308|INFO|###payWithVisa.Enabled =True; payWithVisa.Visible =False; canPayWithCard=True
2016-03-29 11:37:49.1348|INFO|payWithVisa.Enabled =True; payWithVisa.Visible =False; canPayWithCard=True
Run Code Online (Sandbox Code Playgroud)
您可以看到变量payWithVisa.Visible未更新.尽管为其赋值为true的变量,它仍然是错误的.
有人可以帮我澄清一下是什么问题吗?
PS.使用的.NET框架:4.0
| 归档时间: |
|
| 查看次数: |
47 次 |
| 最近记录: |