Authorized viewing or setting the view as authorized?

Is it better to create a separate view for authorized and unauthorized people, even if there is not a lot of additional information in the authorized view? Or should there be one view with the model data adjusted accordingly?

EDIT: In MVC, I find it better to have 2 views and then use partial views for duplicate information. agree?

+5
source share
2 answers

There is no “better” solution. It all depends on the situation. As for me, I didn’t use it to create “almost identical” views without an important reason.

UPDATED:

, "" ViewModel , . " "

+1

/ . , .

: " ", , , , (- ):

<% =Html.RenderNewLink() %>

.. , IsAuthenticated, .

, , . , , , /.

, . .

+1

All Articles