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

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
博客园 - 司徒正美
N
News and Events Feed by Topic
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
Help Net Security
Help Net Security
N
News and Events Feed by Topic
O
OpenAI News
L
LangChain Blog
F
Full Disclosure
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
GbyAI
GbyAI
Cloudbric
Cloudbric
W
WeLiveSecurity
Application and Cybersecurity Blog
Application and Cybersecurity Blog
罗磊的独立博客
Attack and Defense Labs
Attack and Defense Labs
PCI Perspectives
PCI Perspectives
TaoSecurity Blog
TaoSecurity Blog
AI
AI
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cisco Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
T
The Exploit Database - CXSecurity.com
T
Threatpost
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Last Week in AI
Last Week in AI
雷峰网
雷峰网
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Cyber Attacks, Cyber Crime and Cyber Security
博客园 - 聂微东
P
Proofpoint News Feed
Latest news
Latest news
S
SegmentFault 最新的问题
J
Java Code Geeks
T
Threat Research - Cisco Blogs
H
Help Net Security
P
Privacy International News Feed

博客园 - weekzero

百度编辑器ueditor批量上传图片或者批量上传文件时,文件名称和内容不符合,错位问题 代码漏洞扫描描述Cross Site History Manipulation解决办法[dongcoder.com] iis重写模块实现程序自动二级域名,微软提供的URL重写2.0版本适用IIS以上 借助微软提供的url重写类库URLRewriter.dll(1.0)实现程序自动二级域名,域名需要泛解析 AspNetPager控件报错误: Syntax error, unrecognized expression: input#ctl00$ContentPlaceHolder1$Aspnetpager1_input问题解决[摘] 精准定位才能赢得人心 IIS7.5打开GZip压缩,同时启用GZip压缩JS/CSS文件的设置方法 c#变量缺少using引用,如何快速加上using,加Using的快捷键 chart.js插件生成折线图时数据普遍较大时Y轴数据不从0开始的解决办法 要用于尝试,广东移动间接实现“流量不清零” jquery中ajax在firefox浏览器下“object XMLDocument”返回结果的解决办法 mvc中Url.RouteUrl或者Html.RouteLink实现灵活超链接,使href的值随路由名称或配置的改变而改变 《舌尖上的中国》第二季今日首播了,天猫食品也跟着首发,借力使力 Ubuntu 14.04 (Trusty Tahr) LTS发布,附下载地址,各种镜像 System.Data.OleDb操作access数据库类 大数据量下,分页的解决办法 winform设置button的边框颜色,或取消边框颜色,不显示边框 winform里操作打开在panel里的form窗体,子窗体操作同级子窗体或者父窗体的方法 cWeb开发框架,基于asp.net的cWeb应用开发平台介绍(二)
mvc中多参数URL会很长,首次加载不传参数让url很短,路由规则实现方法
weekzero · 2014-04-22 · via 博客园 - weekzero

如要实现列表中地址全路径“bubufx-11-2.html”,在首次进入时,使用短路径“bubufx.html”,只有再次href后才显示全路径“bubufx-11-2.html”,下面使用路由规则来实现。

//"/bubufx-11-2.html",eID=11,pageIndex=2
routes.MapRoute("bubufx", "{action}-{eID}-{pageIndex}.html",
               new { controller = "bubufx", action = "Index" });

//"/bubufx-11.html",eID=11,pageIndex默认是1
routes.MapRoute("bubufx_No_pageIndex", "{action}-{eID}.html",
               new { controller = "bubufx", action = "Index", eID = 1, pageIndex = 1 });

//"/bubufx.html",eID默认是1,pageIndex默认是1
routes.MapRoute("bubufx_No_eID_pageIndex", "{action}.html",
               new { controller = "bubufx", action = "Index", eID = 1, pageIndex = 1 });

完整方案:

routes.MapRoute("bubufx_wuAction", "{controller}.html", new { controller = "home", action = "index", id = "" });//没有Action的路由规则
routes.MapRoute("bubufx_wuID", "{controller}/{action}.html", new { controller = "home", action = "index", id = "" });//没有ID的路由规则
routes.MapRoute("Default", "{controller}/{action}/{id}.html", new { controller = "home", action = "index", id = "" });//默认匹配
routes.MapRoute("Root", "", new { controller = "home", action = "index", id = "" });//根目录路由规则