crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

What is ViewData in MVC
Question Posted on 23 Mar 2019Home >> DotNet >> MVC >> What is ViewData in MVC

What is ViewData in MVC
ViewData is similar to ViewBag. Which is useful in transferring data from Controller to View. ViewData have the key, value pairs as dictionary which drived from class "ViewDataDictionary". Its transfers data from controller to view but not vice-versa. And its valid only during the current request. In action method we setting the value for ViewData and in view the value will be fetched by typecasting.



ViewData MVC

ViewData only lasts during current http request. ViewData values will be cleared if redirection occurs.
ViewData value must be type cast before use.
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

How to create Razor enable application in MVC3

Can you write down some syntax for Razor in MVC3

Basic diagram of MVC

Different MVC version with there features

Could not load type System.Web.Mvc.ViewPage in asp.net MVC2






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap