SlideShare a Scribd company logo
2
Most read
5
Most read
10
Most read
BY ME
 Model: Is creating classes and writing the
business logic and can be connected to a
database.
 View: Is the design [UI: User Interface].
 Controller: Helps to communicate between
model from view.
 From View, user gives input.
 The input is given to the Controller.
 The Controller then passes the data to a
Model.
 The Model checks the data and return back
to the View.
 When we run the program , by default it
invokes Index method.
 The Index method then invokes the
corresponding View.
 Every View has the extension as .cshtml
[Combination of C# and HTML code].
 Every action method should be associated
with a View.
 By default, the View name and Controller
name will be same.
 If the View name and Controller name is
different,
return view("viewname")
 ViewData: Is used to store data as a key-value
pair. It stores a single data at a time.
 Syntax:
ViewData["key"]=value;
where key is a unique name. It is user-
defined.
 ViewBag: Is used to store the data by giving a
name.
 Is used to store more than one data.
 Syntax:
ViewBag.name=value;
 The syntax used in view page is a
combination of C# code and HTML code is
called as Razor Syntax. ie: [C#,HTML ] or
[VB,HTML].
 Extension of the file is .cshtml or .vbhtml.
 @ Character symbol has to used to access the
C# code.
 C# code are case-sensitive.
 Strings must be in double quotes.
 Statement must be in semicolon.
 Variables can be declared using var keyword.
 The views which do not have a complete code
but it contains a code , which can be reused
by multiple views is called Partial Views.
 It has to be created inside a shared folder.
 The name of the partial view should start with
"_" Character.
 When we create the view, we should choose
option as
"Create as partial view".
 If we want to call the partial view from any of
our actual views,
@Html.Partial("_Myview")
THANK YOU

More Related Content

PDF
Spring MVC Framework
PPT
ASP.NET MVC Presentation
PDF
Asp.net mvc basic introduction
PPTX
Spring Framework
PPTX
Asp.net MVC training session
PPTX
Spring Web MVC
PPT
Introduction to Javascript
PDF
Javascript basics
Spring MVC Framework
ASP.NET MVC Presentation
Asp.net mvc basic introduction
Spring Framework
Asp.net MVC training session
Spring Web MVC
Introduction to Javascript
Javascript basics

What's hot (20)

PPTX
MVC Framework
PDF
Hibernate Presentation
PDF
JavaScript - Chapter 15 - Debugging Techniques
PPTX
React workshop
PDF
jQuery for beginners
PPTX
jQuery
PPT
Spring ppt
PPT
MVC ppt presentation
PDF
MVC Architecture
PDF
React js
PDF
Model View Controller (MVC)
PDF
JavaScript - Chapter 11 - Events
PPTX
Presentation on "An Introduction to ReactJS"
PDF
Spring Boot
PPT
Java Servlets
PPTX
Introduction to Spring Framework
PPTX
Hibernate ppt
PPTX
Lab #2: Introduction to Javascript
PDF
Basics of JavaScript
PPTX
.Net Core
MVC Framework
Hibernate Presentation
JavaScript - Chapter 15 - Debugging Techniques
React workshop
jQuery for beginners
jQuery
Spring ppt
MVC ppt presentation
MVC Architecture
React js
Model View Controller (MVC)
JavaScript - Chapter 11 - Events
Presentation on "An Introduction to ReactJS"
Spring Boot
Java Servlets
Introduction to Spring Framework
Hibernate ppt
Lab #2: Introduction to Javascript
Basics of JavaScript
.Net Core
Ad

Viewers also liked (13)

PPTX
PDF
PPT
16 Career Clusters
PDF
Marketing y Publicidad En Tiempos De Crisis
PPT
Enhancing demand for creative industries
PDF
Developing or Deepening your Law Practice Niche
DOCX
PDF
Open PHACTS MIOSS may 2016
PPT
Medwiser: Empowering Youth to Save Youth
PDF
Electronics for hombrew
PDF
SEO+UX = SEOUX @UXRepublic
16 Career Clusters
Marketing y Publicidad En Tiempos De Crisis
Enhancing demand for creative industries
Developing or Deepening your Law Practice Niche
Open PHACTS MIOSS may 2016
Medwiser: Empowering Youth to Save Youth
Electronics for hombrew
SEO+UX = SEOUX @UXRepublic
Ad

Similar to ASP.NET MVC. (20)

PPTX
ASP.NET MVC 5 - EF 6 - VS2015
PPTX
MVC & SQL_In_1_Hour
PPTX
Model view controller (mvc)
DOCX
LearningMVCWithLINQToSQL
PPTX
Simple mvc4 prepared by gigin krishnan
PPTX
MVC Training Part 1
PPTX
Asp.net c# MVC-5 Training-Day-2 of Day-9
PPTX
Asp.Net MVC 5 in Arabic
PPTX
Asp.net mvc training
PPTX
Asp.Net MVC Intro
PDF
Asp 1-mvc introduction
PPTX
Asp.net c# MVC-5 Training-Day-1 of Day-9
PPTX
Getting started with MVC 5 and Visual Studio 2013
PPTX
Asp.NET MVC
PDF
ASP.NET MVC difference between questions list 1
PPTX
ASP.MVC Training
DOCX
Adding a view
PDF
Jinal desai .net
PPT
ASP.NET-MVC-Part-1.ppt
PPTX
Getting Started with ASP.NET MVC 3 and Razor
ASP.NET MVC 5 - EF 6 - VS2015
MVC & SQL_In_1_Hour
Model view controller (mvc)
LearningMVCWithLINQToSQL
Simple mvc4 prepared by gigin krishnan
MVC Training Part 1
Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.Net MVC 5 in Arabic
Asp.net mvc training
Asp.Net MVC Intro
Asp 1-mvc introduction
Asp.net c# MVC-5 Training-Day-1 of Day-9
Getting started with MVC 5 and Visual Studio 2013
Asp.NET MVC
ASP.NET MVC difference between questions list 1
ASP.MVC Training
Adding a view
Jinal desai .net
ASP.NET-MVC-Part-1.ppt
Getting Started with ASP.NET MVC 3 and Razor

More from Ni (13)

PDF
Embedded Systems Q and A M.Sc.(IT) PART II SEM III
 
DOCX
Cryptography summary
 
DOCX
INFORMATION SECURITY MANAGEMENT
 
PDF
INFORMATION SECURITY: THREATS AND SOLUTIONS.
 
PPTX
India's social challenge
 
PPTX
ADOBE DREAMWEAVER
 
DOCX
PYTHON NOTES
 
PPTX
Code coverage analysis in testing
 
PPTX
LASER
 
PPTX
Java communication api
 
PPTX
Library management system
 
PPTX
Impact of social networking sites- advantages and disadvantages
 
PPTX
Ppt on nan
 
Embedded Systems Q and A M.Sc.(IT) PART II SEM III
 
Cryptography summary
 
INFORMATION SECURITY MANAGEMENT
 
INFORMATION SECURITY: THREATS AND SOLUTIONS.
 
India's social challenge
 
ADOBE DREAMWEAVER
 
PYTHON NOTES
 
Code coverage analysis in testing
 
LASER
 
Java communication api
 
Library management system
 
Impact of social networking sites- advantages and disadvantages
 
Ppt on nan
 

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
A Presentation on Artificial Intelligence
PDF
Modernizing your data center with Dell and AMD
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
The Rise and Fall of 3GPP – Time for a Sabbatical?
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
A Presentation on Artificial Intelligence
Modernizing your data center with Dell and AMD
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Approach and Philosophy of On baking technology
Empathic Computing: Creating Shared Understanding
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Electronic commerce courselecture one. Pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

ASP.NET MVC.

  • 2.  Model: Is creating classes and writing the business logic and can be connected to a database.  View: Is the design [UI: User Interface].  Controller: Helps to communicate between model from view.
  • 3.  From View, user gives input.  The input is given to the Controller.  The Controller then passes the data to a Model.  The Model checks the data and return back to the View.
  • 4.  When we run the program , by default it invokes Index method.  The Index method then invokes the corresponding View.  Every View has the extension as .cshtml [Combination of C# and HTML code].
  • 5.  Every action method should be associated with a View.  By default, the View name and Controller name will be same.  If the View name and Controller name is different, return view("viewname")
  • 6.  ViewData: Is used to store data as a key-value pair. It stores a single data at a time.  Syntax: ViewData["key"]=value; where key is a unique name. It is user- defined.
  • 7.  ViewBag: Is used to store the data by giving a name.  Is used to store more than one data.  Syntax: ViewBag.name=value;
  • 8.  The syntax used in view page is a combination of C# code and HTML code is called as Razor Syntax. ie: [C#,HTML ] or [VB,HTML].  Extension of the file is .cshtml or .vbhtml.
  • 9.  @ Character symbol has to used to access the C# code.  C# code are case-sensitive.  Strings must be in double quotes.  Statement must be in semicolon.  Variables can be declared using var keyword.
  • 10.  The views which do not have a complete code but it contains a code , which can be reused by multiple views is called Partial Views.  It has to be created inside a shared folder.  The name of the partial view should start with "_" Character.
  • 11.  When we create the view, we should choose option as "Create as partial view".  If we want to call the partial view from any of our actual views, @Html.Partial("_Myview")