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?
Dynamically changed the src of the Iframe to difference aspx.
Dim frame As HtmlControl = CType(Me.FindControl("frameMain"), HtmlControl)
frame.Attributes("src") = "page1.aspx"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)
开发者_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.
精彩评论