DHJJ [Hatsune's Journal Japan] blog

Hatsune's Journal Japan blog

目次

Blog 利用状況

ニュース

最新ツイート

運営サイト

Hatsune's Journal Japan
DHJJ

著作など

資格など

OCP
MCP

書庫

日記カテゴリ

わんくま同盟

「もっとWeb開発を簡単に」Razor

RazorはASP.NET MVCのViewをもっと簡単に書けるようにする記述方法です。

http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx

例えばproductsに含まれている製品名と価格の一覧を列挙したいときには、引用元のURLではC#ですが、きっとVBでも書けるので次のように記述できるようになるのでしょう。

<ul id="products">
    @For Each p In products
        <li>@p.Name ($@p.Price)</li>
    @Next
</ul>

ちなみに今までは次のようになります。

<ul id="products">
    <% For Each p In products %>
        <li>)<%= p.Name %> ($)<%= p.Price %>)</li>
    <% @Next %>
</ul>

だいぶ見通しが良くなりますよね。

投稿日時 : 2010年7月5日 14:53

Feedback

# 
Twitter Trackbacks for

????????????Web?????????????????????Razor
[wankuma.com]
on Topsy.com
2010/07/05 15:19 Pingback/TrackBack


Twitter Trackbacks for

????????????Web?????????????????????Razor
[wankuma.com]
on Topsy.com

# 「もっとWeb開発を簡単に」ASP.NET Web Matrix 2010/07/07 18:35 DHJJ [Hatsune's Journal Japan] blog

「もっとWeb開発を簡単に」ASP.NET Web Matrix

# ASP.NET MVC 3 Previewの悲しいお知らせ 2010/08/29 18:31 DHJJ [Hatsune's Journal Japan] blog

ASP.NET MVC 3 Previewの悲しいお知らせ

# ugg boots uk 2012/11/17 16:12 http://www.uggbootsuksalecheaps.co.uk/

A mate which you just find having exposes may be purchased in you and your family.
ugg boots uk http://www.uggbootsuksalecheaps.co.uk/

# casque monster beats by dr dre 2012/11/17 16:13 http://www.beatsbydrdrepascherfrsoldes.com/

Wear‘p fecal matter time on your men/ladies,what person isn‘p ready fecal matter his or her period for you.
casque monster beats by dr dre http://www.beatsbydrdrepascherfrsoldes.com/

# nike free 3.0 v2 2012/11/19 14:15 http://www.nikeschuhedamenherren.com/nike-free-30-

I really like happened by way of what you are, yet somehow by way of exactly who I am just their morning away with you.
nike free 3.0 v2 http://www.nikeschuhedamenherren.com/nike-free-30-v2-herren-laufschuhe-weiß-grau-p-1002.html/

# Pull Louis Vuitton 2012/11/25 18:34 http://www.fr-marque.com/

Seriously like is going to be athletic anxiety for your everyday living along with the expansion of what my partner and i really like.
Pull Louis Vuitton http://www.fr-marque.com/

# casquette obey 2013/03/14 7:32 http://www.a44.fr/

Seriously like often is the popular requirement towards life-style as well growth of whatever some of us fancy. casquette obey http://www.a44.fr/

# Casquette Chicago Bulls 2013/03/16 16:02 http://www.c88.fr/

Put on‘d fecal matter this moment around a humans/girl,just who isn‘d prepared fecal matter his or her free time upon you. Casquette Chicago Bulls http://www.c88.fr/

# ruemee.com 2013/04/07 0:03 http://ruemee.com/

A real acquaintance certainly one which one overlooks your backsliding also tolerates your positive results. ruemee.com http://ruemee.com/

タイトル
名前
Url
コメント