PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

Pass Parameter To MasterPage ?

 
 
googlegroup@desiboy.com
Guest
Posts: n/a
 
      16th Jan 2007
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)

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      16th Jan 2007
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


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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)
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing a control on a masterpage that uses a second masterpage Torben Laursen Microsoft ASP .NET 4 15th Mar 2008 04:27 AM
Masterpage change its masterpage mr t Microsoft ASP .NET 0 29th Aug 2007 11:11 PM
MasterPages - take plain form, add MasterPage. MasterPage does NOT appear when run Randy Smith Microsoft ASP .NET 8 14th Apr 2007 10:06 AM
MasterPage inheriting a MasterPage... is it possible? ThunderMusic Microsoft ASP .NET 2 27th Sep 2006 08:57 PM
MasterPage -> Page -> MasterPage Code Access =?Utf-8?B?QWxleCBNYWdoZW4=?= Microsoft ASP .NET 3 14th Apr 2006 01:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:38 PM.