ASP.NET Nested masterpages, how to set content in the top page from the aspx file? -
i have content cms need move raw asp.net pages. since templates nested guess can use nested masterpages acomplish it, i'm finding can't set values on top masterpage deep child page.
here sample. have several nested masterpages contentplaceholders:
- top master (with contentplaceholder1)
- nested master, dependent on top master (with contentplaceholder2)
- aspx page, dependent on nested master, defines content contentplaceholder1 , 2
the problem asp.net doesn't allow me have value of contentplaceholder1 defined in content page, should defined in nested master. point client page knows value, not template masters (for instance, page knows graphic has display on the top, placeholder graphic top master).
how can set values in aspx page rendered in top master?
normally have following:
- setup public property on master page
- add @masterpage declaration top of content page want access property in
- access property
master.yourpageproperty = "value";
in case of nested masterpages must setup pass-through public properties using same method above doing in nested master page (ie define nested master pages master page , set dummy public properties set value passed in nested master top master).
try looking @ article reinforce ideas have touched upon:
Comments
Post a Comment