开发者

Is there a way to server.transfer from my MVC controller to another Webforms page in the same folder?

开发者 https://www.devze.com 2023-02-11 07:33 出处:网络
I have a site with some logic in an MVC project and other logic in an older webforms project. Can I server.transfer from an m开发者_JS百科vc controller to a webforms page?

I have a site with some logic in an MVC project and other logic in an older webforms project.

Can I server.transfer from an m开发者_JS百科vc controller to a webforms page?

Or transfer in some other way?


You can use Redirect() method on a controller (which returns RedirectResult) but this will cause the return of HTTP 301 and a roundtrip to the server to the new location.

There is no Server.Transfer direct equivalent in MVC.

You could have used Html.RenderAction in your view, but it will be a bit nasty and requires your other action to be in MVC.

0

精彩评论

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