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

推荐订阅源

L
LangChain Blog
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG

博客园 - xumingming

C# 长浏览 SQL Server 的位运算 sql 的随机函数newID()和RAND() Linq To Xml (增,删,改,查) - xumingming sp_executesql的用法 Sql Server 存储过程分页 linq 存储过程返回多个结果集 Sql语句访问WEB 一些常用的类 MVC Controller与ActionResult的返回值 - xumingming - 博客园 IEnumerable_T_、IEnumerable、ICollection_T_、IList_T_、ObservableCollectin_T_和Collection_T_得关系 JQuery与Ajax常用代码 MVC 小笔记 - xumingming - 博客园 GridView 的临时增删改查示例 GridView 72般绝技 C#代码中的事务 - xumingming - 博客园 VS2005中将GridView 中的数据导出至excel - xumingming - 博客园 触发器 删除数据库表中的信息(适用于被注入)
routes.MapRoute - xumingming - 博客园
xumingming · 2009-09-21 · via 博客园 - xumingming

 routes.MapRoute(
                "Default",
                "{controller}/{action}/{id}",
                new { action = "Index", id = "0" },
                new { controller = @"^\w+", action = @"^\w+", id = @"^\d+" });

            // Archive/2008-05-07
            routes.MapRoute(
                "BlogArchive",
                "Archive/{date}",
                new { controller = "Blog", action = "Archive" },
                new { date = @"^\d{4}-\d{2}-\d{2}" });

            // Car/bmw.abc
            routes.MapRoute(
                "Car",
                "Car/{make}.{model}",
                new { controller = "Car", action = "Index" },
                new { make = @"(acural|bmw)" });

            //必须是提交post url直接回车是get
            routes.MapRoute(
                "Book",
                "Book/Add/{name}",
                new { controller = "Book", action = "Add" },
                new { httpMethod = "POST" });

            //后面所有东西都捕获
            routes.MapRoute(
                "CatchIt",
                "Product/{*values}",
                new { controller = "Product", action = "Index" });