本文介绍了MVC3 URL重定向到新位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Asp.net MVC制作应用程序,
我有一个动态生成的网址,例如http:\ localhost:4351 \ username
我想要的功能是,如果用户将其复制到地址栏上,它将重定向到新的地址,例如
http:\ localhost:4355 \ users \ profile \用户名
我在其中定义了一个名为users的控制器和一个名为profile的操作
Hi,
I am making an application using Asp.net MVC,
I have a url which is generating dynamically like http:\localhost:4351\username
I want the functionality that if a user copy it on address bar it''ll redirect to a new address like
http:\localhost:4355\users\profile\username
I''ve a controller named users and an action named profile defined in it
How can i implement this functionality?
推荐答案
这篇关于MVC3 URL重定向到新位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!