开发者

Iframe vs dynamically loading web user controls

I need some advice on techniques to perform page redirect in asp.net. Which one is more recommended to use in asp.net?

  1. Dynamically changed the src of the Iframe to difference aspx.

    Dim frame As HtmlControl = CType(Me.FindControl("frameMain"), HtmlControl)

    frame.Attributes("src") = "page1.aspx"

  2. Dynamically load web user controls to an asp:panel.

    panelMain.Controls.Clear()

    panelMain.Controls.Add(LoadControl("WebControl/page1.ascx"))

    (convert all aspx page to web user controls)

  3. 开发者_Go百科


Not sure what you are after. It actually depends on scenario. But converting all the pages in to usercontrol is definitely not a good idea. User Controls are not made for this. IFrame seems more sensible between this two.

However, you might try using JQuery/ajax to render page output into div.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜