Private Function GetWebDataGridOKButtonId() As String
Dim ctls As ControlCollection = _
WebDataGrid1.Controls(0).Controls(0).Controls
Dim btn As Button
Dim qry = From item As Control In ctls _
Where item.ID = "ButtonOK" _
Select item
btn = qry.ToList()
Return btn.ClientID
End Function
這不適用於我。我正在嘗試迭代控件集合並返回一個控件ID。我對linq很有新意。Linq迭代控件集合
感謝, 〜CK
它會拋出任何錯誤嗎?如果是這樣,你可以發佈嗎? – shahkalpesh 2009-06-29 19:08:20