|
I want to define the Label text dynamically from database, and loop all the Label contorl in the content.
How can i put the Page_Load function to all of my page?
foreach (Control ctrl in Page.Controls)
{
foreach (Control ctrl0 in ctrl.Controls)
{
//ctrl0
if (ctrl0.GetType() == typeof(Label))
//Load DB text
ctrl0.Text = db.Text;
}
}
|