Reputation: 41
Is it possible to control the placement of a generated control in asp .net 2.0 (c#)?
So for example in my page_load I create a new Panel() and then do Form.Controls.Add(pnl). However I'm finding it renders right at the end of the form.
I would like it rendering as the first element in the form.
Upvotes: 1
Views: 134
Reputation: 187020
You can use
Controls.AddAt() method, which adds the specified Control object to the collection at the specified index location.
Upvotes: 1