开发者

ASP.NET MVC iframe load

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜