开发者

Url.Action ASP.NET how do i redirect?

I want to redirect a link using url,action(...)to an external site http://external.com/Page.html

How do i do that in 开发者_StackOverflow社区ASP.NET?


Since the local ASP.Net site does not have knowledge of the external site, just enter your code in plain Html:

 <a href="http://external......">....</a>

If you need to calculate parameters:

 <a href="http://external......?<%= MyParamsCorrectlyEncoded() %>">....</a>

If you are using MVC (your question mentions Url.Action) you can use AttributeEncode to encode the attributes to the external site.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜