ViewData
Type: ViewDataDictionary
(key-value pair, loosely typed)
Scope: From Controller to View
✅ Use Case:
Passing small amounts of temporary data from controller to view.
✅ Example:
Controller:
View (Razor):
⚠️ Considerations:
-
Requires type casting
-
Null reference risk
-
Not strongly typed