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

推荐订阅源

博客园 - 【当耐特】
Help Net Security
Help Net Security
P
Proofpoint News Feed
J
Java Code Geeks
爱范儿
爱范儿
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
Google DeepMind News
Google DeepMind News
H
Help Net Security
G
Google Developers Blog
Jina AI
Jina AI
Vercel News
Vercel News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
Lohrmann on Cybersecurity
S
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
GbyAI
GbyAI
B
Blog
O
OpenAI News
博客园_首页
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
TaoSecurity Blog
TaoSecurity Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
C
Cisco Blogs
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
AI
AI
W
WeLiveSecurity
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale

博客园 - 许晓光

四舍五入 - 许晓光 - 博客园 ASP.NET 2.0 - 控件系列(四) – GridView绑定 - 许晓光 ASP.NET Video Streaming 在线视频播放 - 许晓光 C#调用dos命令 SQL – Select查询的多种方法 ASP.NET MVC 学习心得 (6) –jQuery取得控件值 - 许晓光 ASP.NET MVC 学习心得 (5) –AJAX - 许晓光 ASP.NET MVC 学习心得 (4) – 视图控制器 ASP.NET 事件冒泡技术 ASP.NET MVC 学习心得 (3) – 怎样使用服务器控件 ASP.NET MVC 学习心得 (2) - 怎样创建自定义URL Routing 一个非常简单的C#面试题 C# Object Initialization SQL Server 性能优化(4) – Performance – Indexed Views SQL Server 性能优化(3) – Performance - DataTypes SQL – Sub Query SQL - TOP ASP.NET – Master Page 和Content Page事件执行顺序 ASP.NET 中使用Windows Live ID 验证登录
ASP.NET MVC 学习心得 (1) - 怎样创建简单程序
许晓光 · 2009-04-09 · via 博客园 - 许晓光

使用VS2008 创建ASP.NET MVC Web Application 项目。

This C# source file under Controllers folder

[HandleError]

public class HomeController : Controller

{

public ActionResult Index()

{

ViewData["Message"] = "Welcome to ASP.NET MVC!";

ViewData["Name"] = "John";

return View();

}

public ActionResult About()

{

return View();

}

}

This ASP.NET web page under Views folder

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="indexHead" ContentPlaceHolderID="head" runat="server">

<title>Home Page</title>

</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">

<h2><%= Html.Encode(ViewData["Message"]) %></h2>

<h2><%= Html.Encode(ViewData["Name"]) %></h2>

<p>

To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>.

</p>

</asp:Content>