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

ASP .Net Interview Questions.
1. What is ASP? Active Server Pages (ASP), also known as Classic ASP, is a Microsoft's server-side technology, which helps in creating dynamic and user-friendly Web pages. It uses different scripting...

Format Date to “MM/dd/yyyy” in Webgrid ASP.Net MVC Razor View
Replace above line with below to apply ("DD/mm/yyyy") formatting to date field in WebGrid AllTicket.Column(columnName: "DueDate", header: "Due Date") grid.Column("Date",format:@<text> @item.Date.ToString("MM/dd/yyyy")</text>)
M

Mohammad Shafi

0 0
0

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

Service-Level Agreement (SLA) Definition
A service-level agreement (SLA) is a contract between a service provider and its internal or external customers that documents what services the provider will furnish. SLAs originated with network service...
M

Mohammad Shafi

0 0
0

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