开发者

ASP.NET MVC iframe load

开发者 https://www.devze.com 2023-01-07 09:27 出处:网络
How can I load an ascx control in an ASP.NET MVC? I\'m using url.action in src but it is not working. Can i 开发者_开发知识库do that?If you want the ascx to appear in the response then you can use the

How can I load an ascx control in an ASP.NET MVC? I'm using url.action in src but it is not working. Can i 开发者_开发知识库do that?


If you want the ascx to appear in the response then you can use the Html.Partial or Html.RenderPartial methods.

If you want to have an IFrame in the response that will load some other page, then you cannot use an ascx control alone. You will need a full view (aspx) that is returned from some action method. The full view could use Html.Partial and Html.RenderPartial to render your ascx.

0

精彩评论

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

关注公众号