---
title: "What is difference between TempData and ViewData ?"  
description: "What is difference between TempData and ViewData ?"  
author: "Anonymous User"  
published: 2019-10-21  
updated: 2020-09-15  
canonical: https://www.mindstick.com/interview/33670/what-is-difference-between-tempdata-and-viewdata  
category: "c#"  
tags: ["c#", "asp.net mvc", "mvc"]  
reading_time: 1 minute  

---

# What is difference between TempData and ViewData ?

“**TempData**” maintains data for the complete request while “**ViewData**” maintains data only from the Controller to the view.

## Answers

### Answer by Anonymous User

“**TempData**” maintains data for the complete request while “**ViewData**” maintains data only from the Controller to the view.


---

Original Source: https://www.mindstick.com/interview/33670/what-is-difference-between-tempdata-and-viewdata

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
