Pass Parameter To MasterPage ?

  • Thread starter Thread starter googlegroup
  • Start date Start date
G

googlegroup

How do you pass a parameter into the master pages, much like the TITLE.
I'd like to pass SectionID from the ChildPages to the MasterPage
(which calculates information based on SectionID)
 
A good way is to declare a public property SectionID on the master page and
set it from content pages as this.Master.SectionID=xxx

You will need to add a line

<%@ MasterType virtualpath="~/MyMaster.master" %>

into your content page.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
Back
Top