views:

44

answers:

3

Hi,

I have a 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.

+2  A: 

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

Adam Pope
it's nice to do like this. But, I already have an aspx page created. Why should I create a usercontrol with same functionalities. (And I dont wanna use the frameset also.)
AmiT
@AmiT: 1. Converting the existing aspx to an ascx is not hard. 2. user controls have nothing to do with framesets.
Joel Coehoorn
ya, its 100% true that user controls have nothing to do with framesets, my main purpose is to show that already created page on the top of my content page. And perhaps I can divide the complete master page in two frames, 1st for that already created page and 2nd for a content place holder.And I am not sure. It's just a way.. may be right. trying ...!
AmiT
A: 

I would use UserControls. MyHeader.ascx.

Arthur
A: 

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.

Jim B