Pass Parameter To MasterPage ?

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)
 
E

Eliyahu Goldin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top