Posted on: 1/12/2014 12:32:38 AM | Views : 759

For Each item As RepeaterItem In Repeater1.Items Dim hidden = TryCast(item.FindControl("HiddenField1"), HiddenField) Dim label2 = TryCast(item.FindControl("lblTimer"), Label) 'Grab your DateTime object (checking that it exists)' Dim label3 = TryCast(item.FindControl("Label2"), Label) 'Store your TimeSpan Difference' Dim ts = (DateTime.Now - DateTime.Parse(hidden.Value)) Dim travelTime As New TimeSpan(0, 0, 0, 0) Dim result2 As Integer = TimeSpan.Compare(ts, travelTime) If result2 <= 0 Then 'Now you can output your time as you please (excluding any decimal points)' label2.Text = String.Format("Time Left: {0:dd\:hh\:mm\:ss}", ts) Else timer1.Enabled = True Using con1 As New SqlConnection(_start) ...

Go to the complete details ...