How to get number of control on web page

foreach (Control ctrl in Page.Form.Controls) { Response.Write(ctrl.ID); }