updatepanel更新后的内容传到控件外
ProtectedSubTimer3_Elapsed(ByValsenderAsObject,ByValeAsSystem.EventArgs)StaticzAsDate...
Protected Sub Timer3_Elapsed(ByVal sender As Object, ByVal e As System.EventArgs)
Static z As Date = CDate(Label20.Text)
If z <> CDate("00:00:00") Then
Label28.Text = "1"
ImageButton10.Visible = True
z = z.AddSeconds(-1)
Label20.Text = Microsoft.VisualBasic.Format(z, "HH:mm:ss")
If z <= CDate(TextBox6.Text) Then
Label28.Text = "2"
ImageButton10.Visible = False
ImageButton11.Visible = True
If z = CDate("00:00:00") Then
Label28.Text = "3"
ImageButton10.Visible = False
ImageButton11.Visible = False
ImageButton12.Visible = True
End If
End If
Else
Timer3.Enabled = False
ImageButton12.Visible = False
End If
End Sub
这是我的UPDATEPANEL控件中的TIMER函数,其中Label28是控件外的另一个控件,我想让UPDATEPANEL控件在时时跟新时,LABEL28的TEXT也随之改变,请问怎么实现,我的代码无法实现这功能,请大家改正 展开
Static z As Date = CDate(Label20.Text)
If z <> CDate("00:00:00") Then
Label28.Text = "1"
ImageButton10.Visible = True
z = z.AddSeconds(-1)
Label20.Text = Microsoft.VisualBasic.Format(z, "HH:mm:ss")
If z <= CDate(TextBox6.Text) Then
Label28.Text = "2"
ImageButton10.Visible = False
ImageButton11.Visible = True
If z = CDate("00:00:00") Then
Label28.Text = "3"
ImageButton10.Visible = False
ImageButton11.Visible = False
ImageButton12.Visible = True
End If
End If
Else
Timer3.Enabled = False
ImageButton12.Visible = False
End If
End Sub
这是我的UPDATEPANEL控件中的TIMER函数,其中Label28是控件外的另一个控件,我想让UPDATEPANEL控件在时时跟新时,LABEL28的TEXT也随之改变,请问怎么实现,我的代码无法实现这功能,请大家改正 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询