0

I have diffrent group and I need to show the related page for each group. so when a user open the app, I need to first check the user's groupID, if it's 0 pop up a window and ask the group and save it, if it has groupID load the related page. I don't have one layout as a start page and it depends on the user's groupID which page should load up.

I find this topic related but I'm totally confused. I think all of this needs to be taken care of by controllers to check the groupID and load the related layout. which controller should take care of all this?

1 Answer 1

1

HomeController. this controller usually is the first controller that receives user request. you should add your related code to the Index action method of HomeController.

However, if a user call a page different from your start page (something like : www.domain.com/some) that trick doesn't work.

To achieve it in these situations, you should add your code to your top level layout.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.