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

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -