如何在MVC中制作自定义URL [英] How to make Custom url in MVC

查看:56
本文介绍了如何在MVC中制作自定义URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想使用我的自定义网址,例如www.domainname / contoller / anyvalue / anyvalue1 / anyvalue2

我不喜欢我想在url中指定我的动作名称。

我如何通过使用注册路由或任何其他解决方案来实现这一目标?

Hi,

I want to use my custom url like www.domainname/contoller/anyvalue/anyvalue1/anyvalue2
I don't want to specify my action name in url.
How I can achieve this by using register route or any other solution?

推荐答案

谷歌mvc自定义路线,你会找到如何做到这一点的教程。



http://www.asp.net/mvc/overview/older-versions-1/controllers-and-routing/ creation-custom-routes-cs [ ^ ]
Google "mvc custom routes" and you'll find tutorials on how to do this.

http://www.asp.net/mvc/overview/older-versions-1/controllers-and-routing/creating-custom-routes-cs[^]


这篇关于如何在MVC中制作自定义URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆