Awesome q2a theme

How to pass data between controllers and views?

0 like 0 dislike
47 views
in Asp net did manual registration and authentication(checked against a database from ssms). so, I need to pass data between views and controllers, namely the authenticated user, maybe I will order the service and data should be its ID. So I want layout to output the email of the authenticated user
tell me how to implement it? thank you
by | 47 views

2 Answers

0 like 0 dislike
There are several methods.
by
0 like 0 dislike
Examine in detail the concept of MVC and why it is needed. The data needs to go from controller to the view for display and presentation to the controller. No more. No between views and between controllers.
If You want to store common data for all views, then save them either in the session (server side) or cookie (client-side). And index will read this data, such as cookies and display layout.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Apr 26, 2019 by slink7576
0 like 0 dislike
3 answers
asked May 22, 2019 by bojack1579
110,608 questions
257,187 answers
0 comments
40,796 users