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 |
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 btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click 'ปุ่มนะ | |
ClearTextBox(Me) 'เรียกใช้ฟังก์ชั่นข้างล่าง | |
End Sub | |
Public Sub ClearTextBox(ByVal root As Control) 'เอาฟังชั่นนี้ไปใส่ไว้ตรงไหนก็ได้ | |
For Each ctrl As Control In root.Controls | |
ClearTextBox(ctrl) | |
If TypeOf ctrl Is TextBox Then | |
CType(ctrl, TextBox).Text = String.Empty | |
End If |
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 btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click | |
ClearTextBox(Me) | |
End Sub | |
Public Sub ClearTextBox(ByVal root As Control) | |
For Each ctrl As Control In root.Controls | |
ClearTextBox(ctrl) | |
If TypeOf ctrl Is TextBox Then | |
CType(ctrl, TextBox).Text = String.Empty | |
End If | |
Next ctrl |