惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
Schneier on Security
Schneier on Security
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
A
About on SuperTechFans
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
V2EX - 技术
V2EX - 技术
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
V
Visual Studio Blog
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
Scott Helme
Scott Helme
H
Heimdal Security Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Vulnerabilities – Threatpost
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Troy Hunt's Blog
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
Jina AI
Jina AI
S
Securelist
小众软件
小众软件
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
AWS News Blog
AWS News Blog
N
News and Events Feed by Topic
博客园 - 三生石上(FineUI控件)
量子位

博客园 - 王伟晔

docker 主从mysql配置 利用asp.net Core开发webapi对接云之家智能审批数据互联控件 Windows 2012安装odoo12 Windows有点腻了?不如试试Ubuntu. 处理范例代码Webapi中的Mongodb的Bson中ObjectId反序列化异常 用app.net Core搞掂多国语言网站 重建程序员能力(3)-asp.net MVC框架增加Controller 重建程序员能力(2)-如何使asp.net mvc应用增加js和其他功能 重建程序员能力(1) asp.net mvc 5发布部署遇到403.14 我需要在Web上完成一个图片上传的功能(+2) 我需要在Web上完成一个图片上传的功能后续(+1) 我需要在Web上完成一个图片上传的功能 android-studio-bundle-141.1980579-windows download Site C# Hello World - 王伟晔 用params关键字增强代码的可读性 陌生的yield关键字 发现Visual Studio隐含的大礼包--漂亮的Visual Studio图像库 职业程序员必须要有的工作态度(之一)
Razor提高WebPage代码的易读性
王伟晔 · 2012-02-28 · via 博客园 - 王伟晔

传统的asp用的'<%Code Blog%>'涵括服务器需要处理的逻辑代码。

Razor用的是'@',使得我们的WebPage更加的优雅。

大家可以参看:

http://www.asp.net/web-pages/tutorials/basics/2-introduction-to-asp-net-web-programming-using-the-razor-syntax

 现在的开发大部分分为前台和后台。以前我当程序员的时候,我的拍档抱怨自己的美术功底很差劲。后来我们将工作一份为二,把界面设计都分给了美工,但美工不认识我们的代码技术,经常把我们已经写好的逻辑删掉了,而后来的代码维护,我们又把美工的Code删掉了,很不默契。

asp.net时代的到来,让我们把后台的逻辑和页面的展现分开了,谢天谢地,我们的那位美工师没有误删掉我们的代码。但没过几天,代码白痴又在抱怨那里一大堆<%%>让他漂亮的作品走形了。

现在多亏了Razor,代码白痴也发现WebPage上显示的问题了。