UrbanPro
true

Learn ASP.NET from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Difference Between View Bag And View Data In Mvc

Suprio Dutta
15/12/2018 0 0

ViewData belongs to dictionary class whereas view bag is the dynamic object. i.e., dictionary class create objects that validate data for viewdata whereas dynamic object validates data for ViewBag.
Also,
The typical typecasting must for viewdata to avoid casting exceptions. Whereas casting is not required aspect for view bag, ie, the string should identify sting type int by int type date with date type there should not be a mismatch in data recognition at validation this known as casting, ViewBag does not require this casting if casting not done in viewdata exception occurs.

0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

Export To Excel using StringBuilder in ASP.net MVC C#
public ActionResult Export() { StringBuilder sb = new StringBuilder(); //static file name, can be changes as per requirement string sFileName = "filename.xls"; //Bind...
M

Mohammad Shafi

1 0
1

ASP.NET - Introduction
ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required to build up robust web applications for PC, as well as mobile...

Software Development Training In Jaipur
Satyam Web Solution provides website designing &development and software designing &development training in Jaipur for various stream’s students. MCA 6 month Industrial Training/Internship B....

Contents Of ASP.NET
Getting Started with ASP.NET This module explains how to build and configure a simple ASP.NET application. Lessons: Introduction to ASP.NET Web Applications Features of ASP.NET Configuring ASP.NET...

Extension method In C#
Introduction. Hello Guys, In this article, I will explain what is extension method and why and where we should use this. Let’s understand the term extension means we are going to create something...
X

Looking for ASP.NET Classes?

The best tutors for ASP.NET Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn ASP.NET with the Best Tutors

The best Tutors for ASP.NET Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more