C#
protected void Button1_Click(object sender, EventArgs e)
{
var ctrl = from ctr in this.Controls.Cast<Control>().OrderBy(c => c.ID)
select ctr;
}
VB.NET
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim ctrl = _
From ctr In Me.Controls.Cast(Of Control)().OrderBy(Function(c) c.ID) _
Select ctr
End Sub
Tweet
No comments:
Post a Comment