Accessing controls on a masterpage
Aug 3
2006
Here are a couple of neat things in ASP.NET 2.0 that I've used recently.
- Access the controls on a master page. You'd think it must be possible, and it is, it's easy to do.
Label Label1 = (Label)Master.FindControl("Label1"); Label1.Text = "Set by child page";
- ObjectDataSource...Before I used it I was suspecting that it may have been like one of the adapters in 1.1 which I try to keep away from on a the page itself. I find it cleaner to put all the database access logic in a datalayer under the business objects. Well it seems Microsoft may have been thinking the same thing! I can say nothing else but 'wow' to this control. This little component will bind just about anything including all the business objects that you've written. If you're not familiar with it, or have been avoiding it, it's worth checking out.
No new comments are allowed on this post.

Comments
Speednet
I developed a nice techique for accessing Master Page control which you may find useful. I explained its use for accessing an Atlas ScriptManager, but it can be used for any control.
http://forums.asp.net/thread/1339455.aspx
victor fierro
excelent, thanks a lot. It is completely functional