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

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - 南阳·源

ThinkPHP运算符与PHP运算符对照表 ThinkPHP常用配置路径 Asp.Net MVC3(三)-MvcApp实现全局异常捕获 Json数据字符串 反序列化对象时出现错误。遇到意外字符 ICSharpCode.SharpZipLib.dll压缩的zip包,7zip解压时出错 日期转换为中文日期 向大家推荐一款UI对话框框架artDialog Asp.Net MVC3(二)-过滤器定义 Json数据序列化对象,及对象序列化为Json格式 序列化/反序化 C# Enum转换 List<T> OrderBy问题 WCF访问安全 跨域访问WCF问题 [转] 检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件时失败 Split [转]RegistryKey 操作注册表 js控制ctrl+p sql:过滤字段中是否包含数字
Asp.Net MVC3(一)-多Area时,路由设置问题
南阳·源 · 2012-02-03 · via 博客园 - 南阳·源

在添加多个Area时,如添加:AreaTest ,需求修改AreaTestAreaRegistration.cs

View Code

public class AreaTestAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "AreaTest";
}
}

public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"AreaTest_default",
"AreaTest/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional },
null,
new string[] { "Mini.WebAppMvc3.Areas.AreaTest.Controllers.*" }
);
}
}


修改RegisterArea方法,添加两个参数.

public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"AreaTest_default",
"AreaTest/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional },
null,
new string[] { "Mini.WebAppMvc3.Areas.AreaTest.Controllers.*" }
);
}