Data sent to Model cleans while changing page?

0

A question that has come to me now, based on this post: Building Customizable Menu in ASP.NET MVC

If I populate my MenuItem model when the user logs in, it will populate, for example, with the following "modules":

-Products

-Clients

-Users

I'd be making this Model "population" in my Login Controller . When I go to another action from another controller, for example the action Register of the controller Users , my MenuItem model will be emptied and I will have who popular it again, or will it continue to fill with modules already filled in?

    
asked by anonymous 10.09.2018 / 20:14

1 answer

1

There is no need to pass the menu model to each screen.

Normally the menu is loaded in the layout or by a partialview, so every time you switch pages, there will be a menu load.

    
10.09.2018 / 20:25