Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 


What is ViewData in MVC
Question Posted on 23 Mar 2019

Home >> 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



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


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






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |