If you are using Master Pages for your website and wish to control the content of them from your content page then you need to know about the MasterType directive.
Simply place the following piece of code at the top of any content page.
<%@ MasterType virtualpath="~/Default.master" %>
just replace the virtualpath with the actual path to your master page, and there you have it.
You can now control server controls and elements on your Master page from your content pages by simply calling the Master in your source code.
For Example
Lets say you want to find a panel from a content page that actually lives on your master page, then you would just do the following.
Dim SomePanel As Panel = Master.FindControl("SomePanel")
This simply uses FindControl to locate the Panel with an ID of SomePanel, although the principle is the same for any other control on your Master page.
So play around and see how easy it is to control all of your website.
This blog is about all things internet, techy and business related. Its contains the latest Tech info from the big players, how to do stuff online and my predictions for the future. FaceBook, Google, Microsoft, Twitter.
Sunday, 11 April 2010
Wednesday, 24 March 2010
New Property Social Networking site
I thought I would break from the norm a bit and let you know about a new property based social networking site called Property People - The Property Place.
It looks like a great place to show off your property, chat live with other members and share your property interests.
Why not take a look http://budurl.com/propertypeople
It looks like a great place to show off your property, chat live with other members and share your property interests.
Why not take a look http://budurl.com/propertypeople
Subscribe to:
Posts (Atom)