What are the roles and similarities between ViewData and ViewBag?

Joined
Jan 15, 2016
Messages
6
Best answers
0
Points
1
#1
  1. Maintains data when moving from controller to view.
  2. Passes data from the controller to the respective view.
  3. Their value becomes null when any redirection occurs, because their role is to provide a way to communicate between controllers and views. It's a communication mechanism within the server call.
 
Older Threads
Replies
11
Views
1,517
Replies
2
Views
1,095
Replies
16
Views
2,712
Replies
28
Views
3,146
Newer Threads
Replies
1
Views
892
Replies
2
Views
822
Replies
7
Views
1,549
Latest Threads
Replies
0
Views
6
  • Deleted
  • Deleted by fwh
Replies
0
Views
1
  • Deleted
  • Deleted by fwh
Replies
0
Views
1
  • Deleted
  • Deleted by fwh
Replies
0
Views
1
  • Deleted
  • Deleted by fwh
Replies
0
Views
1
Recommended Threads
Replies
6
Views
2,312
  • Locked
Replies
2
Views
2,062
Replies
1
Views
1,898

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top