I posted same answer to your previous question.I would suggest,if you want to add anything to already asked question,please modify it before reposting it.
The basicic heirachy of controls on a page (which uses MasterPages) is MasterPage then HtmlForm then ContentPlaceHolder and then finally will come all the labels, textboxes, and whatever other controls you seek (note that if these controls contain children of their own, like a GridView, you will need to loop through that control to get all the included controls in it).
foreach (Control masterControl in Page.Controls)
{
if (masterControl is MasterPage)
{
foreach (Control formControl in masterControl.Controls)
{
if (formControl is System.Web.UI.HtmlControls.HtmlForm)
{
foreach (Control contentControl in formControl.Controls)
{
if (contentControl is ContentPlaceHolder)
{
foreach (Control childControl in contentControl.Controls)
{
}
}
}
}
}
}
}
For a specific control use this
if (childControl is Label)
{
Label newLabel = (Label)childControl;
newLabel.Text = "You found me!"
}
Source :
http://www.krissteele.net/blogdetails.aspx?id=104[
^]