Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
asp.net-在特定时间段内禁用某些内容_Asp.net_Time - Fatal编程技术网

asp.net-在特定时间段内禁用某些内容

asp.net-在特定时间段内禁用某些内容,asp.net,time,Asp.net,Time,我想更改我的内容,例如从15:00到17:00。禁用标签或类似的东西。我可以用什么来做呢?VB.NET If DateTime.Now >= New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 15, 0, 0) AndAlso DateTime.Now <= New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day,

我想更改我的内容,例如从15:00到17:00。禁用标签或类似的东西。我可以用什么来做呢?

VB.NET

If DateTime.Now >= New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 15, 0, 0) AndAlso DateTime.Now <= New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 17, 0, 0) then
   MyPanel.Visible = false
End If

如果DateTime.Now>=新的DateTime(DateTime.Now.Year,DateTime.Now.Month,DateTime.Now.Day,15,0,0)和同样的DateTime.NowVB.NET

If DateTime.Now >= New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 15, 0, 0) AndAlso DateTime.Now <= New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 17, 0, 0) then
   MyPanel.Visible = false
End If
如果DateTime.Now>=New DateTime(DateTime.Now.Year、DateTime.Now.Month、DateTime.Now.Day、15,0,0)和DateTime.Now