asp.net mvc - Dynamic _Layout page without the user logging in? -


i'm looking put dynamic information in _layout.cshtml file. menus rendered on screen should different per user. trying @ _loginpartial in default application, unlike page, don't have "login" form on page send controller. in mvc application, user should logged in.

i'm trying integrate our erp solution have here has it's own web service. user log web service, able click link on page , directed application. logging in handled our erp solution. @ time, menu should rendered differently based on user's permissions. in practice, time user accesses application, should "logged in", , never not "logged in".

the erp solution have believe allows access user's id number (among few other items) passed among it's pages. can query database other required information need (ex. staff member or student?). in application, don't know how information , store in session prior _layout loading.

it seems you're mixing abstract idea of presentation (layout) , logic. layout should exclusively html. if need type of dynamic parts in there, i'd recommend doing default mvc template , either call partial or action html.renderaction() provide logic need them dynamic.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -