SlideShare a Scribd company logo
1 of 20
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
 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.
 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
 Example : Class & Object of OOP
201

More Related Content

What's hot

MVC4 framework
MVC4 frameworkMVC4 framework
MVC4 frameworkimarkovic
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.Ni
 
Be project ppt asp.net
Be project ppt asp.netBe project ppt asp.net
Be project ppt asp.netSanket Jagare
 
Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Umar Ali
 
Repository and Unit Of Work Design Patterns
Repository and Unit Of Work Design PatternsRepository and Unit Of Work Design Patterns
Repository and Unit Of Work Design PatternsHatim Hakeel
 
Scott Schuster Portfolio 04262011
Scott Schuster Portfolio 04262011Scott Schuster Portfolio 04262011
Scott Schuster Portfolio 04262011schusco12
 
Dependency injection presentation
Dependency injection presentationDependency injection presentation
Dependency injection presentationAhasanul Kalam Akib
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overviewumesh patil
 
Difference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcDifference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcUmar Ali
 
Asp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationAsp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationabhishek singh
 
Difference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvcDifference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvcUmar Ali
 
Product Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsProduct Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsSandeep Adwankar
 

What's hot (20)

MVC4 framework
MVC4 frameworkMVC4 framework
MVC4 framework
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 
ASP.NET - Ivan Marković
ASP.NET - Ivan MarkovićASP.NET - Ivan Marković
ASP.NET - Ivan Marković
 
Be project ppt asp.net
Be project ppt asp.netBe project ppt asp.net
Be project ppt asp.net
 
angular js
 angular  js angular  js
angular js
 
Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4
 
GraphQL
GraphQLGraphQL
GraphQL
 
Repository and Unit Of Work Design Patterns
Repository and Unit Of Work Design PatternsRepository and Unit Of Work Design Patterns
Repository and Unit Of Work Design Patterns
 
Scott Schuster Portfolio 04262011
Scott Schuster Portfolio 04262011Scott Schuster Portfolio 04262011
Scott Schuster Portfolio 04262011
 
Building Information Systems with MERN
Building Information Systems with MERNBuilding Information Systems with MERN
Building Information Systems with MERN
 
2310 b 01
2310 b 012310 b 01
2310 b 01
 
Dependency injection presentation
Dependency injection presentationDependency injection presentation
Dependency injection presentation
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overview
 
Graphql
GraphqlGraphql
Graphql
 
Difference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcDifference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvc
 
Web development using asp.net
Web development using asp.netWeb development using asp.net
Web development using asp.net
 
GraphQL
GraphQLGraphQL
GraphQL
 
Asp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationAsp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentation
 
Difference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvcDifference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvc
 
Product Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsProduct Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical Skills
 

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

Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Thomas Robbins
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handsonPrashant Kumar
 
Introduction to sails.js
Introduction to sails.jsIntroduction to sails.js
Introduction to sails.jsAmit Bidwai
 
.NET Core, ASP.NET Core Course, Session 11
.NET Core, ASP.NET Core Course, Session 11.NET Core, ASP.NET Core Course, Session 11
.NET Core, ASP.NET Core Course, Session 11aminmesbahi
 
Asp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin SawantAsp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin SawantNitin Sawant
 
Enterprise Library 2.0
Enterprise Library 2.0Enterprise Library 2.0
Enterprise Library 2.0Raju Permandla
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentationOleksii Usyk
 
Silverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel PatternSilverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel PatternDerek Novavi
 
Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introductionFajar Baskoro
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introductionCommit University
 
Academy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storageAcademy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storageBinary Studio
 
Entity Framework Code First Migrations
Entity Framework Code First MigrationsEntity Framework Code First Migrations
Entity Framework Code First MigrationsDiluka99999
 

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

Session 1
Session 1Session 1
Session 1
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
 
Aspnetmvc 1
Aspnetmvc 1Aspnetmvc 1
Aspnetmvc 1
 
Introduction to sails.js
Introduction to sails.jsIntroduction to sails.js
Introduction to sails.js
 
.NET Core, ASP.NET Core Course, Session 11
.NET Core, ASP.NET Core Course, Session 11.NET Core, ASP.NET Core Course, Session 11
.NET Core, ASP.NET Core Course, Session 11
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Asp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin SawantAsp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin Sawant
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Enterprise Library 2.0
Enterprise Library 2.0Enterprise Library 2.0
Enterprise Library 2.0
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)
 
Silverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel PatternSilverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel Pattern
 
Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introduction
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introduction
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
MVC
MVCMVC
MVC
 
Academy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storageAcademy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storage
 
Entity Framework Code First Migrations
Entity Framework Code First MigrationsEntity Framework Code First Migrations
Entity Framework Code First Migrations
 

More from AHM Pervej Kabir

Asp.net c# mvc Training Day-4 of Day-9
Asp.net c# mvc Training Day-4 of Day-9Asp.net c# mvc Training Day-4 of Day-9
Asp.net c# mvc Training Day-4 of Day-9AHM Pervej Kabir
 
Knowledge share about scalable application architecture
Knowledge share about scalable application architectureKnowledge share about scalable application architecture
Knowledge share about scalable application architectureAHM Pervej Kabir
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineeringAHM Pervej Kabir
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineeringAHM Pervej Kabir
 
Shot note about project management
Shot note about project managementShot note about project management
Shot note about project managementAHM Pervej Kabir
 
Data Collection From Field
Data Collection From FieldData Collection From Field
Data Collection From FieldAHM Pervej Kabir
 
Automated Survey Data Received and Sync From Field
Automated Survey Data Received and Sync From FieldAutomated Survey Data Received and Sync From Field
Automated Survey Data Received and Sync From FieldAHM Pervej Kabir
 
Automated Survey Question Creator Management
Automated Survey Question Creator ManagementAutomated Survey Question Creator Management
Automated Survey Question Creator ManagementAHM Pervej Kabir
 
Reporting about Overview Summery of ISO-27000 Se.(ISMS)
Reporting about Overview Summery  of ISO-27000 Se.(ISMS)Reporting about Overview Summery  of ISO-27000 Se.(ISMS)
Reporting about Overview Summery of ISO-27000 Se.(ISMS)AHM Pervej Kabir
 

More from AHM Pervej Kabir (13)

Business Analysis.pptx
Business Analysis.pptxBusiness Analysis.pptx
Business Analysis.pptx
 
Asp.net c# mvc Training Day-4 of Day-9
Asp.net c# mvc Training Day-4 of Day-9Asp.net c# mvc Training Day-4 of Day-9
Asp.net c# mvc Training Day-4 of Day-9
 
Knowledge share about scalable application architecture
Knowledge share about scalable application architectureKnowledge share about scalable application architecture
Knowledge share about scalable application architecture
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineering
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineering
 
Shot note about project management
Shot note about project managementShot note about project management
Shot note about project management
 
CMMI
CMMICMMI
CMMI
 
Agile
AgileAgile
Agile
 
Data Collection From Field
Data Collection From FieldData Collection From Field
Data Collection From Field
 
Automated Survey Data Received and Sync From Field
Automated Survey Data Received and Sync From FieldAutomated Survey Data Received and Sync From Field
Automated Survey Data Received and Sync From Field
 
Automated Survey Question Creator Management
Automated Survey Question Creator ManagementAutomated Survey Question Creator Management
Automated Survey Question Creator Management
 
Presentation
PresentationPresentation
Presentation
 
Reporting about Overview Summery of ISO-27000 Se.(ISMS)
Reporting about Overview Summery  of ISO-27000 Se.(ISMS)Reporting about Overview Summery  of ISO-27000 Se.(ISMS)
Reporting about Overview Summery of ISO-27000 Se.(ISMS)
 

Recently uploaded

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 

Recently uploaded (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

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
  • 4.
  • 5.
  • 6.
  • 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.
  • 9.
  • 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
  • 17.
  • 18.  Example : Class & Object of OOP
  • 19.
  • 20. 201