Created
September 17, 2014 04:47
-
-
Save niwatpumkin/daa79edab4ffa08d4619 to your computer and use it in GitHub Desktop.
catch error Addsecound on type string not found
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load | |
If Not IsPostBack Then | |
RadGrid2.DataSource = Data() | |
RadGrid2.DataBind() | |
For i As Integer = 0 To RadGrid2.Items.Count - 1 | |
Dim lbltime As Label = RadGrid2.Items.Item(i).FindControl("lblTime") | |
StartTime = DateTime.Now.AddMinutes(lbltime.Text).ToString("HH:mm:ss") | |
CurrentTime = StartTime.ToString | |
lbltime.Text = CurrentTime.ToString("HH:mm:ss").ToString | |
Session("time") = lbltime.Text | |
Next | |
End If | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Protected Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick | |
Try | |
For i As Integer = 0 To RadGrid2.Items.Count - 1 | |
Dim lbltime As Label = RadGrid2.Items.Item(i).FindControl("lblTime") | |
' Dim lbltime1 As Label = RadGrid2.Items.Item(i).FindControl("label3") | |
If Val(lbltime.Text) > 0 Then | |
CurrentTime = Session("time").AddSeconds(-1).ToString | |
lbltime.Text = CurrentTime.ToString("HH:mm:ss").ToString | |
End If | |
Next | |
RadGrid2.Rebind() | |
Catch ex As Exception 'error Addsecound on type String not found | |
End Try | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment