开发者

route that will handle URL's in the URL for MVC 3

I am trying to create a custom route that can handle something like:

domain.com/link/htt开发者_JAVA技巧p://www.someotherdomain.com/blablah.html?qstring=54

Where the passed param is a link...

I cannot get this to work with URL encode and decode.. always returns a bad request?


Pass the link as id.

Something like...

controller:

public SomeAction(string url)
{
   ...
}

View:

@Html.ActionLink("link name", "Action", new {id = "someurl.com"}

or modify the global.asax's routes.MapRoute and add another parameter.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜