際際滷

際際滷Share a Scribd company logo
WELCOME TO IT PROGRAMMING WORLD
朽爐爐 爐爐爐爛 爐爐爛 爐む 爐爛爐萎 爐爛爐爐 爐爛 爐伍が爛爐伍爛爐萎ぞ爐爐 爐爐 爛爐 爐爐爐爐 爐項
爐む 爐爛爐 爐 爐爐 爐 爐爐爐爛 爐爛 爐爐 爐爛爐爛爐伍爐 爐朽た爐÷た爐爛 爐爐爐迦爐 爐爐 爐む
爐爐爐爛 爐爐むぞ 爐爐 爐伍爛
朽爐爐 爐爐爐爛 爐爛 爐朽た爐÷た爐爛 爐踱 爐迦爐 爐項 爐む 爐朽た爐÷た爐爛 爐爛 LIKE 爐爐
SHARE 爐爐萎爐 爐爐萎
 爐оえ爛爐爐逗ぞ爐爛
 爐爐爐 爐爛爐萎爐爛爐萎ぞ爐爐爛爐爐 爐逗ぐ爛爐迦た爐
Tightly Coupled View
(Model bounded view)
in Asp .NET MVC
In asp.net MVC model bounded view is a tightly coupled and it is used to create view. lets create
model bounded view or tightly coupled view in asp.net MVC application for that first we need to
create model, controller and view.
2
Working with Controllers
Controller:
Process incoming request.
Executes the appropriate code initiated or
required by the user
Communicating with the "Model" to validate
and process the data.
3
4/18/2018
What is Controllers
Controller - is a class...
it is .cs code [C# file], which is inherited by a
built-in controller classes.
4
Create Model in Asp.Net MVC Application
 For adding Model Right click on Models folder  select Add  then select Class in asp.net mvc
application. After that a new Dialog (Add New Item) will popup asking you to enter Class name in that
enter name Person like as shown below
5
After adding model now lets add some properties in this
Person class like as shown following
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Web;

 namespace Tutorial3.Models
 {
 public class Person
 {
 public int ID { get; set; }
 public string Name { get; set; }
 public string Address { get; set; }
 public string Mobileno { get; set; }
 }
 }
6
Create Controller in Asp.Net MVC Application
7
After adding controller you can see default code
generated
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Tutorial3.Controllers
{
public class PersonDetailsController : Controller
{
//
// GET: /PersonDetails/
public ActionResult Index()
{
return View();
}
}
}
Now we will change controller method by adding [HttpGet] attribute to Action Method and return new
instance Model Person like as shown below
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Web;
 using System.Web.Mvc;
 using Tutorial3.Models;
 namespace Tutorial3.Controllers
 {
 public class PersonDetailsController : Controller
 {
 //
 // GET: /PersonDetails/
 [HttpGet]
 public ActionResult Index()
 {
 return View(new Person());
 }
 }
 }
8
Create View in Asp.Net MVC Application
 Now lets add view for that just right click
inside controller and select Add View you
will get a pop up like as shown below.
Inside this popup you will see default
View name will be there no need to
change that and we are going to use
Razor engine that why we should select
Razor engine. In Model class we are
going to select Person Model which we
created. In Scaffold template
select Create item and click on Add
button finally.
9
 After click Add button our View will create which is tightly coupled to model that would be like as shown below

 @model Tutorial3.Models.Person

 @{
 ViewBag.Title = "Index";
 }
 <h2>Index</h2>
 @using (Html.BeginForm()) {
 @Html.ValidationSummary(true)
 <fieldset>
 <legend>Person</legend>
 <div class="editor-label">
 @Html.LabelFor(model => model.Name)
 </div>
 <div class="editor-field">
 @Html.EditorFor(model => model.Name)
 @Html.ValidationMessageFor(model => model.Name)
 </div>
10
 <div class="editor-label">
 @Html.LabelFor(model => model.Address)
 </div>
 <div class="editor-field">
 @Html.EditorFor(model => model.Address)
 @Html.ValidationMessageFor(model => model.Address)
 </div>
 <div class="editor-label">
 @Html.LabelFor(model => model.Mobileno)
 </div>
 <div class="editor-field">
 @Html.EditorFor(model => model.Mobileno)
 @Html.ValidationMessageFor(model => model.Mobileno)
 </div>
11
Continue Codes
 <p>
 <input type="submit" value="Create"/>
 </p>
 </fieldset>
 }
 <div>
 @Html.ActionLink("Back to List", "Index")
 </div>
 @section Scripts {
 @Scripts.Render("~/bundles/jqueryval")

 }
12
Here red mark border is showing view is tightly
coupled to person Model. 13
This way we can achieve Model bounded view or tightly coupled
view in asp.net MVC.
This way we can achieve Model bounded view or tightly
coupled view in asp.net MVC.
Thanking for watching ..
Please Subscribe my Channel for next Coming videos direct to
You.
 Hope This Video is helpful for you Like and share not
forget..
 If any feedback Comments 
 IT PROGRAMMING WORLD
 KRISHNA RAJPUT SINGH

More Related Content

What's hot (19)

PPTX
Getting Started with ASP.NET MVC 3 and Razor
Dan Wahlin
PPTX
Test automation
Kaushik Banerjee
PPT
ASP .net MVC
Divya Sharma
PPTX
Asp.Net MVC Intro
Stefano Paluello
PDF
From mvc to viper
Krzysztof Profic
PPTX
AngularJS Scopes
Mohamed Elkhodary
PPTX
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Barry Gervin
PDF
Blindsql
Ritu Raj
PPTX
Jsp session 2
Anuj Singh Rajput
PPTX
Introduction to Android Programming
Raveendra R
PPT
ASP.net MVC CodeCamp Presentation
buildmaster
PPTX
Hands on SPA development
Shawn Constance
PPTX
Introduction To ASP.Net MVC
Joe Wilson
PPTX
Simple mvc4 prepared by gigin krishnan
Gigin Krishnan
PPT
Test Drive Development in Ruby On Rails
Nyros Technologies
PPTX
10 practices that every developer needs to start right now
Caleb Jenkins
PPTX
Learn html and css from scratch
Mohd Manzoor Ahmed
PPTX
Introduction to AngularJS Framework
Raveendra R
PPTX
VIPER Architecture
Ahmed Lotfy
Getting Started with ASP.NET MVC 3 and Razor
Dan Wahlin
Test automation
Kaushik Banerjee
ASP .net MVC
Divya Sharma
Asp.Net MVC Intro
Stefano Paluello
From mvc to viper
Krzysztof Profic
AngularJS Scopes
Mohamed Elkhodary
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Barry Gervin
Blindsql
Ritu Raj
Jsp session 2
Anuj Singh Rajput
Introduction to Android Programming
Raveendra R
ASP.net MVC CodeCamp Presentation
buildmaster
Hands on SPA development
Shawn Constance
Introduction To ASP.Net MVC
Joe Wilson
Simple mvc4 prepared by gigin krishnan
Gigin Krishnan
Test Drive Development in Ruby On Rails
Nyros Technologies
10 practices that every developer needs to start right now
Caleb Jenkins
Learn html and css from scratch
Mohd Manzoor Ahmed
Introduction to AngularJS Framework
Raveendra R
VIPER Architecture
Ahmed Lotfy

Similar to Tightly coupled view (model bounded view) (20)

DOCX
LearningMVCWithLINQToSQL
Akhil Mittal
DOCX
asp.net - for merge.docx
SwapnilGujar13
PDF
ASP.net Manual final.pdf
SwapnilGujar13
PPTX
ASP.NET MVC 5 - EF 6 - VS2015
Hossein Zahed
DOCX
ASP.NET MVC3 RAD
Mdlin tef樽rc
PPTX
Asp.Net MVC 5 in Arabic
Haitham Shaddad
PPT
MVC ppt presentation
Bhavin Shah
PPTX
Asp.NET MVC
vrluckyin
PPTX
Asp.net mvc training
icubesystem
PDF
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
vchircu
PPTX
Model view controller (mvc)
M Ahsan Khan
PPTX
Asp.Net Mvc
micham
PPTX
Hands on with ASP.NET MVC
rahulsahay19
PPTX
MVC Training Part 1
Lee Englestone
PPTX
Asp.Net MVC3 - Basics
Saravanan Subburayal
PPTX
Asp.net mvc 6 with sql server 2014
Fahim Faysal Kabir
PPTX
ASP.MVC Training
Mahesh Sikakolli
PPTX
Mvc summary
Muhammad Younis
PDF
Mastering asp.net mvc - Dot Net Tricks
Gaurav Singh
PPTX
Retrofit Web Forms with MVC & T4
soelinn
LearningMVCWithLINQToSQL
Akhil Mittal
asp.net - for merge.docx
SwapnilGujar13
ASP.net Manual final.pdf
SwapnilGujar13
ASP.NET MVC 5 - EF 6 - VS2015
Hossein Zahed
ASP.NET MVC3 RAD
Mdlin tef樽rc
Asp.Net MVC 5 in Arabic
Haitham Shaddad
MVC ppt presentation
Bhavin Shah
Asp.NET MVC
vrluckyin
Asp.net mvc training
icubesystem
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
vchircu
Model view controller (mvc)
M Ahsan Khan
Asp.Net Mvc
micham
Hands on with ASP.NET MVC
rahulsahay19
MVC Training Part 1
Lee Englestone
Asp.Net MVC3 - Basics
Saravanan Subburayal
Asp.net mvc 6 with sql server 2014
Fahim Faysal Kabir
ASP.MVC Training
Mahesh Sikakolli
Mvc summary
Muhammad Younis
Mastering asp.net mvc - Dot Net Tricks
Gaurav Singh
Retrofit Web Forms with MVC & T4
soelinn
Ad

Recently uploaded (20)

PPTX
JSON, XML and Data Science introduction.pptx
Ramakrishna Reddy Bijjam
PDF
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
DOCX
DLL english grade five goof for one week
FlordelynGonzales1
PDF
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
PPTX
ESP 10 Edukasyon sa Pagpapakatao PowerPoint Lessons Quarter 1.pptx
Sir J.
PPTX
ENGLISH -PPT- Week1 Quarter1 -day-1.pptx
garcialhavz
PDF
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
PPTX
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
PPTX
How to Add New Item in CogMenu in Odoo 18
Celine George
PPTX
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
PPTX
Iv叩n Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
PDF
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
PDF
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
PPT
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
PDF
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
PPTX
Martyrs of Ireland - who kept the faith of St. Patrick.pptx
Martin M Flynn
PDF
Wikinomics How Mass Collaboration Changes Everything Don Tapscott
wcsqyzf5909
PPTX
2025 Completing the Pre-SET Plan Form.pptx
mansk2
PPTX
Project 4 PART 1 AI Assistant Vocational Education
barmanjit380
PPTX
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
JSON, XML and Data Science introduction.pptx
Ramakrishna Reddy Bijjam
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
DLL english grade five goof for one week
FlordelynGonzales1
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
ESP 10 Edukasyon sa Pagpapakatao PowerPoint Lessons Quarter 1.pptx
Sir J.
ENGLISH -PPT- Week1 Quarter1 -day-1.pptx
garcialhavz
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
How to Add New Item in CogMenu in Odoo 18
Celine George
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
Iv叩n Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
Martyrs of Ireland - who kept the faith of St. Patrick.pptx
Martin M Flynn
Wikinomics How Mass Collaboration Changes Everything Don Tapscott
wcsqyzf5909
2025 Completing the Pre-SET Plan Form.pptx
mansk2
Project 4 PART 1 AI Assistant Vocational Education
barmanjit380
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
Ad

Tightly coupled view (model bounded view)

  • 1. WELCOME TO IT PROGRAMMING WORLD 朽爐爐 爐爐爐爛 爐爐爛 爐む 爐爛爐萎 爐爛爐爐 爐爛 爐伍が爛爐伍爛爐萎ぞ爐爐 爐爐 爛爐 爐爐爐爐 爐項 爐む 爐爛爐 爐 爐爐 爐 爐爐爐爛 爐爛 爐爐 爐爛爐爛爐伍爐 爐朽た爐÷た爐爛 爐爐爐迦爐 爐爐 爐む 爐爐爐爛 爐爐むぞ 爐爐 爐伍爛 朽爐爐 爐爐爐爛 爐爛 爐朽た爐÷た爐爛 爐踱 爐迦爐 爐項 爐む 爐朽た爐÷た爐爛 爐爛 LIKE 爐爐 SHARE 爐爐萎爐 爐爐萎 爐оえ爛爐爐逗ぞ爐爛 爐爐爐 爐爛爐萎爐爛爐萎ぞ爐爐爛爐爐 爐逗ぐ爛爐迦た爐
  • 2. Tightly Coupled View (Model bounded view) in Asp .NET MVC In asp.net MVC model bounded view is a tightly coupled and it is used to create view. lets create model bounded view or tightly coupled view in asp.net MVC application for that first we need to create model, controller and view. 2
  • 3. Working with Controllers Controller: Process incoming request. Executes the appropriate code initiated or required by the user Communicating with the "Model" to validate and process the data. 3 4/18/2018
  • 4. What is Controllers Controller - is a class... it is .cs code [C# file], which is inherited by a built-in controller classes. 4
  • 5. Create Model in Asp.Net MVC Application For adding Model Right click on Models folder select Add then select Class in asp.net mvc application. After that a new Dialog (Add New Item) will popup asking you to enter Class name in that enter name Person like as shown below 5
  • 6. After adding model now lets add some properties in this Person class like as shown following using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Tutorial3.Models { public class Person { public int ID { get; set; } public string Name { get; set; } public string Address { get; set; } public string Mobileno { get; set; } } } 6
  • 7. Create Controller in Asp.Net MVC Application 7 After adding controller you can see default code generated using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace Tutorial3.Controllers { public class PersonDetailsController : Controller { // // GET: /PersonDetails/ public ActionResult Index() { return View(); } } }
  • 8. Now we will change controller method by adding [HttpGet] attribute to Action Method and return new instance Model Person like as shown below using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Tutorial3.Models; namespace Tutorial3.Controllers { public class PersonDetailsController : Controller { // // GET: /PersonDetails/ [HttpGet] public ActionResult Index() { return View(new Person()); } } } 8
  • 9. Create View in Asp.Net MVC Application Now lets add view for that just right click inside controller and select Add View you will get a pop up like as shown below. Inside this popup you will see default View name will be there no need to change that and we are going to use Razor engine that why we should select Razor engine. In Model class we are going to select Person Model which we created. In Scaffold template select Create item and click on Add button finally. 9
  • 10. After click Add button our View will create which is tightly coupled to model that would be like as shown below @model Tutorial3.Models.Person @{ ViewBag.Title = "Index"; } <h2>Index</h2> @using (Html.BeginForm()) { @Html.ValidationSummary(true) <fieldset> <legend>Person</legend> <div class="editor-label"> @Html.LabelFor(model => model.Name) </div> <div class="editor-field"> @Html.EditorFor(model => model.Name) @Html.ValidationMessageFor(model => model.Name) </div> 10
  • 11. <div class="editor-label"> @Html.LabelFor(model => model.Address) </div> <div class="editor-field"> @Html.EditorFor(model => model.Address) @Html.ValidationMessageFor(model => model.Address) </div> <div class="editor-label"> @Html.LabelFor(model => model.Mobileno) </div> <div class="editor-field"> @Html.EditorFor(model => model.Mobileno) @Html.ValidationMessageFor(model => model.Mobileno) </div> 11
  • 12. Continue Codes <p> <input type="submit" value="Create"/> </p> </fieldset> } <div> @Html.ActionLink("Back to List", "Index") </div> @section Scripts { @Scripts.Render("~/bundles/jqueryval") } 12
  • 13. Here red mark border is showing view is tightly coupled to person Model. 13 This way we can achieve Model bounded view or tightly coupled view in asp.net MVC. This way we can achieve Model bounded view or tightly coupled view in asp.net MVC.
  • 14. Thanking for watching .. Please Subscribe my Channel for next Coming videos direct to You. Hope This Video is helpful for you Like and share not forget.. If any feedback Comments IT PROGRAMMING WORLD KRISHNA RAJPUT SINGH