Wednesday, March 28, 2012

Change content pages of Master Page without Master Page posting back?

so Master + content pages seems like exactly what I want except that they are assembled on postbacks. I am trying to make a site where both Master and Content pages have updatepanels, and the site switches content pages (40+ content pages) without the master page refreshing. Master Pages are assembled on postbacks so I don't think simple master page will work without annoying postbacks. I tried an approach where load content pages inside an Iframe, but the content pages take too long to load becuase each content page loads its own scriptmanager. View/Multiview will probably work but difficult to develop a 40 view multiview, I would rather develop 40 separate aspx pages. Any ideas on making any of these three approaches work well? either fix masterpage postback, or fix Iframe load times, or fix View/Multiview eaase of development?

THanks!

Todd Wilder

I think you are looking at the problem backwards - you have to change the MasterPage of the content page. this.Page.MasterPageFile property.

Another option which I successfuly have deployed is dynamically loading a usercontrol into a placeholder on the masterpage.

No comments:

Post a Comment