开发者

show an aspx page in content tag

I have a开发者_StackOverflow master page(MyMasterPage.master) with two content place holders. I wanna show another aspx page(MyHeader.aspx) in the 1st content place holder of a content page(MyContentPage.aspx) that uses my master page.


You should be using user controls for reusable components of a pages. Create a Header.ascx file instead of a .aspx. You can then drag that into your ContentPlaceHolder from the solution explorer when in design mode.

http://msdn.microsoft.com/en-us/library/y6wb1a0e.aspx


I would use UserControls. MyHeader.ascx.


I echo the prior commenter's suggestion to use a usercontrol if possible.

If you really want to keep your existing aspx page; you might want to take a look at using an IFrame to accomplish this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜