SlideShare a Scribd company logo
AHM Pervej Kabir
Analyst Programmer
Cell:+8801757051005
Day-1: 11 September 2017
ASP.Net C#- MVC-5 Training
Introduction
 How to create MVC
 MVC application folder structure
 About View bags
View bags vs View data Vs Temp Data
Layout Configuration
MVC application sample using Entity framework-EF
OOP Concept.
 How to create MVC Application
Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9
 MVC Application Folder Structure
The MVC Framework is based on default naming, it is called convention over configuration of MVC. Models ,Views and Controllers are in different same name folder.
Application information
 Properties
• Also Called project properties
• Consists AssemblyInfo.cs of all the build option for the project include version company name
• GUID, Compiler’s option etc.
 Reference
• It is contains libraries
Application Folder
 App_Data folder
• It is storing application data related files
• We can add different databases like SQL Database, SQL Compact edition database etc.
 Content folder
• It contains static files like cascade style sheet (CSS), icons and images
 Controller folder
• It contains controller classes
• It is responsible for handling user input and response
• MVC requires the name of all controller to end with “Controller”
 Model folder
• It contains the classes thus represent the application model. Model holds and manipulate application data
 View folder
• It contains HTML files to the user interface which called view
• For each controller view folder contains individual folder
• Home folder is use for storing application pages like home page ,about page etc.
• Share folder used to store views shared between controllers (Layout Pages)
 Script folder
• It contains Java Script,Azax,jquery etc. files for the application
Configuration Files
 Global.asax file
 Package.congf file
 Web.config file
Layout
• The file _Layout.cshtml represent the layout of each page in the application
• It is located the shared folder inside the view folder.
Asp.net c# MVC-5 Training-Day-2 of Day-9
 About View Bag
 It is dynamic view datadictionery
 It is dynamic the project
 Asp.net MVC offer us to use ViewBag for passing data from controller to view
Create A model : AboutModel.CS Edit HomController .CS Edit View about.cshtmal
 What is Viewdata, ViewBags and TempData?
Asp.net offers us three options ViewData,ViewBags and ViewData for passing data from controller to
view.
ViewData and View Bags are almost similar and TempData performs additional responsibility.
 Similarity between Viewdata and ViewBags
Helps to maintain data when you move from controller to view
Used to passed data controller to view
Short life means value becomes null when redirect occur
It’s a communication mechanism within he server call
 Difference between Viewdata and ViewBags
ViweData is a dictionary of objects that is derived fromViewDataDictionary class and accessible using
string as keys
ViewBags is a dynamic property that takes advantage of new dynamic feature in latest C#.4.
View Data Requires typecasting for complex data type and check for null values to avoid error.
ViewBags doesn’t require typecasting for complex data type.
 About TempData
 Layout With Razor
It used inherit method to specially content areas
o Render body
o Render Section
Layout Configure
In _ViewStart.cshtml
 This file will execute at the start of each view’s rendering
 Any code contained within the code block in tis file will execute before any code in the view.
 Typically, this file will set the layout template to be used by the view in the application
 An MVC Application can have multiple _ViewStart.cshtml files.
 The order in which these file execute is dependent upon the location of files in the folder hierarchy and the particular view being
 The MVC runtime will first execute the code the _ViewStart.cshtml file locate on the root of the view folder
 It will then work its way up the folder hierarchy, execute the code in each _ViewStart.cshtml file it finds along the way.
 For Example, we may have _ViewStart.cshtml files in the following locations
1)View/_ViewStart.cshtml
2) View/Home/_ViewStart.cshtml
3) View/Product/_ViewStart.cshtml
In Page:
 Object Oriented Programming Concept
 Structured Vs Object Oriented programming
 About Class & Object of OOP
Asp.net c# MVC-5 Training-Day-2 of Day-9
 Example : Class & Object of OOP
Asp.net c# MVC-5 Training-Day-2 of Day-9
201

More Related Content

PPTX
Asp.net c# mvc Training-Day-5 of Day-9
PPTX
Asp.net c# MVC-5 Training-Day-1 of Day-9
PPTX
Asp.net c# mvc Training: Day-3 of Day-9
PDF
Generic repository pattern with ASP.NET MVC and Entity Framework
PPTX
Introducing Razor - A new view engine for ASP.NET
PDF
REPORT ON ASP.NET
PPTX
Asp.Net Core MVC with Entity Framework
PPS
Asp Architecture
Asp.net c# mvc Training-Day-5 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# mvc Training: Day-3 of Day-9
Generic repository pattern with ASP.NET MVC and Entity Framework
Introducing Razor - A new view engine for ASP.NET
REPORT ON ASP.NET
Asp.Net Core MVC with Entity Framework
Asp Architecture

What's hot (20)

PPTX
MVC4 framework
PPTX
ASP.NET MVC.
 
PPTX
ASP.NET - Ivan Marković
PPT
Be project ppt asp.net
PPTX
angular js
PDF
Difference between asp.net mvc 3 and asp.net mvc 4
PDF
PDF
Repository and Unit Of Work Design Patterns
PPTX
Scott Schuster Portfolio 04262011
PPTX
Building Information Systems with MERN
PPT
2310 b 01
PPTX
Dependency injection presentation
PPT
Code igniter overview
PDF
Difference between asp.net web api and asp.net mvc
PPTX
Web development using asp.net
PDF
GraphQL
PPTX
Asp.net and .Net Framework ppt presentation
PDF
Difference between asp.net web forms and asp.net mvc
PPTX
Product Camp Silicon Valley 2018 - PM Technical Skills
MVC4 framework
ASP.NET MVC.
 
ASP.NET - Ivan Marković
Be project ppt asp.net
angular js
Difference between asp.net mvc 3 and asp.net mvc 4
Repository and Unit Of Work Design Patterns
Scott Schuster Portfolio 04262011
Building Information Systems with MERN
2310 b 01
Dependency injection presentation
Code igniter overview
Difference between asp.net web api and asp.net mvc
Web development using asp.net
GraphQL
Asp.net and .Net Framework ppt presentation
Difference between asp.net web forms and asp.net mvc
Product Camp Silicon Valley 2018 - PM Technical Skills
Ad

Similar to Asp.net c# MVC-5 Training-Day-2 of Day-9 (20)

PPTX
Session 1
PPTX
Getting started with MVC 5 and Visual Studio 2013
PPTX
Asp.net With mvc handson
PDF
Asp 1a-aspnetmvc
PDF
Aspnetmvc 1
PDF
Introduction to sails.js
PDF
.NET Core, ASP.NET Core Course, Session 11
PPTX
PPTX
Asp.net mvc presentation by Nitin Sawant
PPSX
Asp.net mvc
PPT
Enterprise Library 2.0
PPT
Spring data presentation
PPTX
cakephp UDUYKTHA (1)
PPT
Silverlight Development & The Model-View-ViewModel Pattern
PDF
Asp 1-mvc introduction
PDF
Code igniter - A brief introduction
PPTX
Codeigniter
PPT
MVC
PPTX
Academy PRO: HTML5 Data storage
PPTX
Entity Framework Code First Migrations
Session 1
Getting started with MVC 5 and Visual Studio 2013
Asp.net With mvc handson
Asp 1a-aspnetmvc
Aspnetmvc 1
Introduction to sails.js
.NET Core, ASP.NET Core Course, Session 11
Asp.net mvc presentation by Nitin Sawant
Asp.net mvc
Enterprise Library 2.0
Spring data presentation
cakephp UDUYKTHA (1)
Silverlight Development & The Model-View-ViewModel Pattern
Asp 1-mvc introduction
Code igniter - A brief introduction
Codeigniter
MVC
Academy PRO: HTML5 Data storage
Entity Framework Code First Migrations
Ad

More from AHM Pervej Kabir (13)

PPTX
Business Analysis.pptx
PPTX
Asp.net c# mvc Training Day-4 of Day-9
PPT
Knowledge share about scalable application architecture
PPT
Software security engineering
PPT
Software security engineering
PPT
Shot note about project management
PDF
Data Collection From Field
PDF
Automated Survey Data Received and Sync From Field
PDF
Automated Survey Question Creator Management
PPTX
Presentation
DOC
Reporting about Overview Summery of ISO-27000 Se.(ISMS)
Business Analysis.pptx
Asp.net c# mvc Training Day-4 of Day-9
Knowledge share about scalable application architecture
Software security engineering
Software security engineering
Shot note about project management
Data Collection From Field
Automated Survey Data Received and Sync From Field
Automated Survey Question Creator Management
Presentation
Reporting about Overview Summery of ISO-27000 Se.(ISMS)

Recently uploaded (20)

PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Complete React Javascript Course Syllabus.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
AI in Product Development-omnex systems
PDF
System and Network Administration Chapter 2
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Introduction to Artificial Intelligence
PPTX
history of c programming in notes for students .pptx
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
top salesforce developer skills in 2025.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
DOCX
The Five Best AI Cover Tools in 2025.docx
Odoo POS Development Services by CandidRoot Solutions
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Complete React Javascript Course Syllabus.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PTS Company Brochure 2025 (1).pdf.......
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Wondershare Filmora 15 Crack With Activation Key [2025
VVF-Customer-Presentation2025-Ver1.9.pptx
AI in Product Development-omnex systems
System and Network Administration Chapter 2
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Introduction to Artificial Intelligence
history of c programming in notes for students .pptx
Materi_Pemrograman_Komputer-Looping.pptx
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
top salesforce developer skills in 2025.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
The Five Best AI Cover Tools in 2025.docx

Asp.net c# MVC-5 Training-Day-2 of Day-9

  • 1. AHM Pervej Kabir Analyst Programmer Cell:+8801757051005 Day-1: 11 September 2017 ASP.Net C#- MVC-5 Training
  • 2. Introduction  How to create MVC  MVC application folder structure  About View bags View bags vs View data Vs Temp Data Layout Configuration MVC application sample using Entity framework-EF OOP Concept.
  • 3.  How to create MVC Application
  • 7.  MVC Application Folder Structure The MVC Framework is based on default naming, it is called convention over configuration of MVC. Models ,Views and Controllers are in different same name folder. Application information  Properties • Also Called project properties • Consists AssemblyInfo.cs of all the build option for the project include version company name • GUID, Compiler’s option etc.  Reference • It is contains libraries Application Folder  App_Data folder • It is storing application data related files • We can add different databases like SQL Database, SQL Compact edition database etc.  Content folder • It contains static files like cascade style sheet (CSS), icons and images  Controller folder • It contains controller classes • It is responsible for handling user input and response • MVC requires the name of all controller to end with “Controller”  Model folder • It contains the classes thus represent the application model. Model holds and manipulate application data  View folder • It contains HTML files to the user interface which called view • For each controller view folder contains individual folder • Home folder is use for storing application pages like home page ,about page etc. • Share folder used to store views shared between controllers (Layout Pages)  Script folder • It contains Java Script,Azax,jquery etc. files for the application Configuration Files  Global.asax file  Package.congf file  Web.config file
  • 8. Layout • The file _Layout.cshtml represent the layout of each page in the application • It is located the shared folder inside the view folder.
  • 10.  About View Bag  It is dynamic view datadictionery  It is dynamic the project  Asp.net MVC offer us to use ViewBag for passing data from controller to view Create A model : AboutModel.CS Edit HomController .CS Edit View about.cshtmal
  • 11.  What is Viewdata, ViewBags and TempData? Asp.net offers us three options ViewData,ViewBags and ViewData for passing data from controller to view. ViewData and View Bags are almost similar and TempData performs additional responsibility.  Similarity between Viewdata and ViewBags Helps to maintain data when you move from controller to view Used to passed data controller to view Short life means value becomes null when redirect occur It’s a communication mechanism within he server call  Difference between Viewdata and ViewBags ViweData is a dictionary of objects that is derived fromViewDataDictionary class and accessible using string as keys ViewBags is a dynamic property that takes advantage of new dynamic feature in latest C#.4. View Data Requires typecasting for complex data type and check for null values to avoid error. ViewBags doesn’t require typecasting for complex data type.
  • 13.  Layout With Razor It used inherit method to specially content areas o Render body o Render Section
  • 14. Layout Configure In _ViewStart.cshtml  This file will execute at the start of each view’s rendering  Any code contained within the code block in tis file will execute before any code in the view.  Typically, this file will set the layout template to be used by the view in the application  An MVC Application can have multiple _ViewStart.cshtml files.  The order in which these file execute is dependent upon the location of files in the folder hierarchy and the particular view being  The MVC runtime will first execute the code the _ViewStart.cshtml file locate on the root of the view folder  It will then work its way up the folder hierarchy, execute the code in each _ViewStart.cshtml file it finds along the way.  For Example, we may have _ViewStart.cshtml files in the following locations 1)View/_ViewStart.cshtml 2) View/Home/_ViewStart.cshtml 3) View/Product/_ViewStart.cshtml In Page:
  • 15.  Object Oriented Programming Concept  Structured Vs Object Oriented programming
  • 16.  About Class & Object of OOP
  • 18.  Example : Class & Object of OOP
  • 20. 201