asp.net mvc - Trying to set master layout view once and have it set for remainder of session -
i have 2 separate master layout designs able use dynamically. essentially, i'd use 1 if user enters (logs in) site via 1 url, or second if through different url.
is there way set "layout" view , maintain user traverses site? i'd prefer handle conditionally once , set user's session. don't want handle on every controller action.
thank ideas.
you can access session
object within _viewstart.*html
. example:
// cshtml @{ layout = session["layout"]; }
' vbhtml @code layout = session("layout") end code
how set session variable in first place depends on structure.
Comments
Post a Comment