how can I pull masterpage content from the database and pass that into the masterpage so that my Views inherits from it? This is an example:
Clients to the website will have a unique code, lets call it "TargetCode", for example, ABC123, ABC456, etc... This unique code will be entered in the querystring, for example: mysite.com/ABC123.
Each of those "TargetCode" will have a different CSS, name, address, phone number, (common to all pages, so these will be placed in the master page) and page contents (around 2-3 pages, lets call thse pages Index, Products, and MoreInfo).
So when I visit the website address,mysite.com/ABC123, first it will look into the database, check if the code exists, if yes, then it pull the Masterpage information (css, name, address, phone number) and use that for the masterpage. Then I will pull the page contents (Index, Products, and MoreInfo) for the other Actions, all these pages will be using the same masterpage content of course.
Thank you very much.
Your master can also take in a MasterPage
System.Web.Mvc.ViewMasterPage.MasterViewModel
so I would have your controller call the model to get the resources you need and then bind the proper view based on your controller view calls.This is what I'm currently having and it seems to work, but I'm not sure if this is the correct way to do it:
Should I use OnActionExecuting() or OnActionExecuted()?