开发者

Render partial aspx page (with codebehind) in MVC

开发者 https://www.devze.com 2023-04-11 21:10 出处:网络
is it possible to rend开发者_JAVA技巧er an web-forms aspx page which has codebehind ? atm I think that I\'m going to do this using an iframe, but it would be much better without.

is it possible to rend开发者_JAVA技巧er an web-forms aspx page which has codebehind ?

atm I think that I'm going to do this using an iframe, but it would be much better without.

anybody knows if this is possible ?


Yes, it's possible to have an aspx with codebehind, as long as its still a proper Mvc view. If it's a WebForms page with controls then things will probably not work. Also if you are using page events (PreRender etc) then it might also not work.

Composing the final output from a mix of Mvc views and WebForms pages is not supported. You will have to use things like iframes

The reason why views in Mvc usually don't have a codebehind is because this might encourage people to put application logic in them which is against the Mvc pattern

0

精彩评论

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