For Each ctl As Control In Me.Controls
If TypeOf ctl Is Button Then
Dim b As Button = ctl
Response.Write(b.ID)
End If
Next
ปล. ไม่แน่ใจนะครับ
Date :
2010-03-11 16:01:50
By :
msorawich
No. 2
Guest
ลองแล้วแต่ยังไม่ได้ครับ
Code (VB.NET)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
For Each ctl As Control In Me.Controls
If TypeOf ctl Is Button Then
Dim b As Button = ctl
Response.Write(b.ID)
End If
Next
End Sub