Submit Search
Upload
Vic weekly learning_20160325
•
Download as PPTX, PDF
•
0 likes
•
188 views
L
LearningTech
Follow
Vic weekly learning_20160325
Read less
Read more
Technology
Report
Share
Report
Share
1 of 11
Download now
Recommended
【第一季•第六期】Ajax & JSONP in Action
【第一季•第六期】Ajax & JSONP in Action
tbosstraining
Vue for beginners
Vue for beginners
m_catt
Static server介绍
Static server介绍
sun jamie
Template mb-kao
Template mb-kao
xwcoder
2011 JavaTwo JSF 2.0
2011 JavaTwo JSF 2.0
Anthony Chen
前端MVC之backbone
前端MVC之backbone
Jerry Xie
Hestkøblund
Hestkøblund
Tomas Norgaard Heiner
Acte no violència famílies 17-11-15 (2)
Acte no violència famílies 17-11-15 (2)
NeusFG
Recommended
【第一季•第六期】Ajax & JSONP in Action
【第一季•第六期】Ajax & JSONP in Action
tbosstraining
Vue for beginners
Vue for beginners
m_catt
Static server介绍
Static server介绍
sun jamie
Template mb-kao
Template mb-kao
xwcoder
2011 JavaTwo JSF 2.0
2011 JavaTwo JSF 2.0
Anthony Chen
前端MVC之backbone
前端MVC之backbone
Jerry Xie
Hestkøblund
Hestkøblund
Tomas Norgaard Heiner
Acte no violència famílies 17-11-15 (2)
Acte no violència famílies 17-11-15 (2)
NeusFG
mercadeo
mercadeo
claudiarodriguezr96
S_Dinakaran_RHCSA
S_Dinakaran_RHCSA
dinakaran s
Sc method1
Sc method1
roshanrm
πληροφορικη Nefeli kathrine
πληροφορικη Nefeli kathrine
KNM2000
Lapata rewa janpad nrega me hera pheri7
Lapata rewa janpad nrega me hera pheri7
Yograj Tiwari
10-Living Without Accumulated Negativity
10-Living Without Accumulated Negativity
Debbie Patterson, B. Msc.
Learning styles john faught
Learning styles john faught
jefaught
Užívateľské testovanie a sledovanie užívateľov
Užívateľské testovanie a sledovanie užívateľov
Webcreator.sk
X tensive dpa - мониторинг станков с ЧПУ университетам.
X tensive dpa - мониторинг станков с ЧПУ университетам.
Igor Tretyakov
PetroSync - Pre-Commissioning, Commissioning and Start-Up
PetroSync - Pre-Commissioning, Commissioning and Start-Up
PetroSync
Илья Коган, Яндекс.Маркет
Илья Коган, Яндекс.Маркет
InSales
Сергей Малышев Почта России eRetailForum2015
Сергей Малышев Почта России eRetailForum2015
InSales
Back to Basic
Back to Basic
Wil Post
Real World ASP.NET MVC
Real World ASP.NET MVC
jeffz
Introduction to CodeIgniter
Introduction to CodeIgniter
Chun-Kai Wang
ASP.Net MVC Framework
ASP.Net MVC Framework
國昭 張
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC
Introduction to ASP.NET MVC and MVC 5 Features
Introduction to ASP.NET MVC and MVC 5 Features
Jeff Chu
Vlog02 [eng sub]什麼是controller和如何在asp.net核心中創建controller?-what is controller ...
Vlog02 [eng sub]什麼是controller和如何在asp.net核心中創建controller?-what is controller ...
SernHao TV
Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有
Wade Huang
CRUD 綜合運用
CRUD 綜合運用
Shengyou Fan
Script with engine
Script with engine
Webrebuild
More Related Content
Viewers also liked
mercadeo
mercadeo
claudiarodriguezr96
S_Dinakaran_RHCSA
S_Dinakaran_RHCSA
dinakaran s
Sc method1
Sc method1
roshanrm
πληροφορικη Nefeli kathrine
πληροφορικη Nefeli kathrine
KNM2000
Lapata rewa janpad nrega me hera pheri7
Lapata rewa janpad nrega me hera pheri7
Yograj Tiwari
10-Living Without Accumulated Negativity
10-Living Without Accumulated Negativity
Debbie Patterson, B. Msc.
Learning styles john faught
Learning styles john faught
jefaught
Užívateľské testovanie a sledovanie užívateľov
Užívateľské testovanie a sledovanie užívateľov
Webcreator.sk
X tensive dpa - мониторинг станков с ЧПУ университетам.
X tensive dpa - мониторинг станков с ЧПУ университетам.
Igor Tretyakov
PetroSync - Pre-Commissioning, Commissioning and Start-Up
PetroSync - Pre-Commissioning, Commissioning and Start-Up
PetroSync
Илья Коган, Яндекс.Маркет
Илья Коган, Яндекс.Маркет
InSales
Сергей Малышев Почта России eRetailForum2015
Сергей Малышев Почта России eRetailForum2015
InSales
Back to Basic
Back to Basic
Wil Post
Viewers also liked
(13)
mercadeo
mercadeo
S_Dinakaran_RHCSA
S_Dinakaran_RHCSA
Sc method1
Sc method1
πληροφορικη Nefeli kathrine
πληροφορικη Nefeli kathrine
Lapata rewa janpad nrega me hera pheri7
Lapata rewa janpad nrega me hera pheri7
10-Living Without Accumulated Negativity
10-Living Without Accumulated Negativity
Learning styles john faught
Learning styles john faught
Užívateľské testovanie a sledovanie užívateľov
Užívateľské testovanie a sledovanie užívateľov
X tensive dpa - мониторинг станков с ЧПУ университетам.
X tensive dpa - мониторинг станков с ЧПУ университетам.
PetroSync - Pre-Commissioning, Commissioning and Start-Up
PetroSync - Pre-Commissioning, Commissioning and Start-Up
Илья Коган, Яндекс.Маркет
Илья Коган, Яндекс.Маркет
Сергей Малышев Почта России eRetailForum2015
Сергей Малышев Почта России eRetailForum2015
Back to Basic
Back to Basic
Similar to Vic weekly learning_20160325
Real World ASP.NET MVC
Real World ASP.NET MVC
jeffz
Introduction to CodeIgniter
Introduction to CodeIgniter
Chun-Kai Wang
ASP.Net MVC Framework
ASP.Net MVC Framework
國昭 張
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC
Introduction to ASP.NET MVC and MVC 5 Features
Introduction to ASP.NET MVC and MVC 5 Features
Jeff Chu
Vlog02 [eng sub]什麼是controller和如何在asp.net核心中創建controller?-what is controller ...
Vlog02 [eng sub]什麼是controller和如何在asp.net核心中創建controller?-what is controller ...
SernHao TV
Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有
Wade Huang
CRUD 綜合運用
CRUD 綜合運用
Shengyou Fan
Script with engine
Script with engine
Webrebuild
Spring 2.x 中文
Spring 2.x 中文
Guo Albert
Backbone js and requirejs
Backbone js and requirejs
Chi-wen Sun
ASP.NET Core MVC 2.2從開發到測試 - Development & Unit Testing
ASP.NET Core MVC 2.2從開發到測試 - Development & Unit Testing
江華 奚
在Windows azure平台上進行資料庫處理及架構設計
在Windows azure平台上進行資料庫處理及架構設計
Sky Chang
Hibernate
Hibernate
Henry Huang
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
Duran Hsieh
Essential oracle security internal for dba
Essential oracle security internal for dba
maclean liu
Nightwatch101
Nightwatch101
Hsin-Hao Tang
How to ASP.NET MVC4
How to ASP.NET MVC4
Daniel Chou
运维系统开发与Rails 3页面开发实践
运维系统开发与Rails 3页面开发实践
Li JianYe
W3CTech美团react专场-Thinking in React
W3CTech美团react专场-Thinking in React
美团点评技术团队
Similar to Vic weekly learning_20160325
(20)
Real World ASP.NET MVC
Real World ASP.NET MVC
Introduction to CodeIgniter
Introduction to CodeIgniter
ASP.Net MVC Framework
ASP.Net MVC Framework
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸
Introduction to ASP.NET MVC and MVC 5 Features
Introduction to ASP.NET MVC and MVC 5 Features
Vlog02 [eng sub]什麼是controller和如何在asp.net核心中創建controller?-what is controller ...
Vlog02 [eng sub]什麼是controller和如何在asp.net核心中創建controller?-what is controller ...
Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有
CRUD 綜合運用
CRUD 綜合運用
Script with engine
Script with engine
Spring 2.x 中文
Spring 2.x 中文
Backbone js and requirejs
Backbone js and requirejs
ASP.NET Core MVC 2.2從開發到測試 - Development & Unit Testing
ASP.NET Core MVC 2.2從開發到測試 - Development & Unit Testing
在Windows azure平台上進行資料庫處理及架構設計
在Windows azure平台上進行資料庫處理及架構設計
Hibernate
Hibernate
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
Essential oracle security internal for dba
Essential oracle security internal for dba
Nightwatch101
Nightwatch101
How to ASP.NET MVC4
How to ASP.NET MVC4
运维系统开发与Rails 3页面开发实践
运维系统开发与Rails 3页面开发实践
W3CTech美团react专场-Thinking in React
W3CTech美团react专场-Thinking in React
More from LearningTech
vim
vim
LearningTech
PostCss
PostCss
LearningTech
ReactJs
ReactJs
LearningTech
Docker
Docker
LearningTech
Semantic ui
Semantic ui
LearningTech
node.js errors
node.js errors
LearningTech
Process control nodejs
Process control nodejs
LearningTech
Expression tree
Expression tree
LearningTech
SQL 效能調校
SQL 效能調校
LearningTech
flexbox report
flexbox report
LearningTech
Vic weekly learning_20160504
Vic weekly learning_20160504
LearningTech
Reflection & activator
Reflection & activator
LearningTech
Peggy markdown
Peggy markdown
LearningTech
Node child process
Node child process
LearningTech
20160415ken.lee
20160415ken.lee
LearningTech
Peggy elasticsearch應用
Peggy elasticsearch應用
LearningTech
Expression tree
Expression tree
LearningTech
D3js learning tips
D3js learning tips
LearningTech
git command
git command
LearningTech
Asp.net MVC DI
Asp.net MVC DI
LearningTech
More from LearningTech
(20)
vim
vim
PostCss
PostCss
ReactJs
ReactJs
Docker
Docker
Semantic ui
Semantic ui
node.js errors
node.js errors
Process control nodejs
Process control nodejs
Expression tree
Expression tree
SQL 效能調校
SQL 效能調校
flexbox report
flexbox report
Vic weekly learning_20160504
Vic weekly learning_20160504
Reflection & activator
Reflection & activator
Peggy markdown
Peggy markdown
Node child process
Node child process
20160415ken.lee
20160415ken.lee
Peggy elasticsearch應用
Peggy elasticsearch應用
Expression tree
Expression tree
D3js learning tips
D3js learning tips
git command
git command
Asp.net MVC DI
Asp.net MVC DI
Vic weekly learning_20160325
1.
MVC-Passing Data Vic Chih 2016-03-25
2.
大綱 • MVC – Controller
to View – ViewData – ViewBag – TempData – View Model – Tuple
3.
Controller to View •
ViewData – ViewDataDictionary字典型別 – Public class ViewDataDictionary : IDictionary<string,object>{} – 必須要有string做Key值 – 無法跨action做存取 – ViewData[“text”] = “Hello MVC”;
4.
Controller to View •
ViewBag – 與ViewData雷同 – dynamic型別 – 物件.屬性 – 在Action呼叫view page時自動傳遞過去 Action Public ActionResult demo() { ViewBag.items = _dc.abc.ToList(); Return View(); } View @foreach(var item in ViewData[“items”] )
5.
Controller to View •
TempData – Action傳Action的時候 可以使用 – 亦是繼承與實作IDictionary – 使用session做資料傳遞 – 透過RedirectToAction導頁到不同的Action時,則可以取得到上一個Action所存放 在TempData的資料 – 在一個要求流程中被取出就會被刪除
6.
Controller to View •
TempData 他是從ASP.NET執行環境一個名稱為 TempData的暫存資料中取資料而非 TempDataDictionary 因為在Source Code中會先判斷若是 子action的方法會直接從TempData 抓取資料而不會刪除session的資料 如果不希望從TempDataDictionary 取資料會被刪除的話使用keep()
7.
Controller to View •
View Model – 大型專案往往需要同時投遞多個Model與物件 – 一個View 只能接收一個model陳述式 – ViewModel包含的屬性可以用來呈現(label for、editor for…) – View Model 可以包含多個不同的model 多個實體或物件
8.
Controller to View •
Tuple – 省下建置ViewModel的時間 – 在View Page亦是強行別 – 可讀性低
9.
強弱型別的差異 • 弱型別 – 沒有型別檢查 –
沒有IntelliSense – 編譯時期無法除錯 – Run time 才能確認是否無誤 – 執行實情才能得知型別資訊 • 強行別 – 編譯時期即能發現錯誤 – 變數能夠被IntelliSense支援 – 執行的速度也較快
10.
Reference • MVC5 網站開發美學 •
http://techfunda.com/howto/asp-net-mvc
11.
Thank you for
your listening
Editor's Notes
會忽略編譯時期的靜態型別檢查
會忽略編譯時期的靜態型別檢查
會忽略編譯時期的靜態型別檢查
Download now