CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: Date Entered: 12/26/2007 6:44:37 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 84 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
"punnaghai_puvi
NewsGroup User
dynamic content pages for master page12/26/2007 6:44:37 AM

0

Hi,

I have a master page in which i have 2 contentplaceholders.

Can i load the contentplaceholders programatically to load a specific web form ar runtime

say contentplaceholder.load("default.aspx")..something like this

 

regard

Punnaghai 

 

"siva_sm" <>
NewsGroup User
Re: dynamic content pages for master page12/26/2007 10:28:49 AM

0

Try this: Place an IFRAME inside the Content page (<asp:Content>) and change the SRC property of the  IFRAME from the code-behind.

 

<asp:Content ID="iframe" runat="server" ContentPlaceHolderID="pid">
<iframe runat="server" id="if"></iframe>
</asp:Content>
 
iframePlaceHolder// Assuming the ContentPlaceHolder control ID in the master page is 
HtmlGenericControl ifx = (HtmlGenericControl)this.Master.FindControl("iframePlaceHolder").FindControl ("if");
ifx.Attributes["src"] = "&lt;URL>";
  
"punnaghai_puvi
NewsGroup User
Re: dynamic content pages for master page12/26/2007 10:37:36 AM

0

I am already using frames and trying to convert those pages to master pages with content holders

i was thinking about other alternatives other than iframes 

 

"siva_sm" <>
NewsGroup User
Re: dynamic content pages for master page12/26/2007 10:50:36 AM

0

IFRAME is the only one (apart from FRAME/FRAMESETs which is not suitable for your case) that can load other pages directly.

Other (perhaps, long) way is to request the target page manually (using HttpWebRequest/HttpWebResponse) and load the  content into a Label control. But, this may its own limitations.

"Amanda Wang -
NewsGroup User
Re: dynamic content pages for master page12/28/2007 8:25:49 AM

0

Hi,

In fact, the master page is entirely different from the iframe, the the MasterPage class derives from the UserControl class, it works as a usercontro on the content page.

You can try to change the master page file for the master page in the  PreInit event dynamically, but you cannot use like you said: contentplaceholder.load("default.aspx")

If you want to use like this, you can use the ifrme, cannot use master page.

You can try to read this article, it talks how the master page works. http://www.odetocode.com/Articles/450.aspx

 

Hope it helps.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:













how to check if synchronous or asynchronous?

access is denied error

my first project: helpdesk/work order system

from textbox to xml file

how to get the data from one page to another page using the asp.net

scanning a cd in asp.net (c#)

find logged on users?

[vb.net newbe]advise for my project: is codebehind necessary here? or are other solutions better?

attributes on user controls

open window dynamically

how to use

creating nav links??

flag status in datagrid

how to update a page after value changed

datetimepicker with default time shown on gui

cookies

live and database tracking of users (question)

thread was being aborted, when i try to create a file

confused about projects & solutions in 2.0

nis/nav,vs2002 or xp pro hotfixes/sps?

vs 2003 formula problem surpressing a negative number.

run dts packets via a web page

requirements for running asp.net files in browser?

is all databinding equal?

embedded resources property

doexpresscheckoutpayment paypal method require login or signup?

<custom confusion />

validationsummary

dropdownbox_selectedindexchange - problem

identifying dll build mode

controlling ascx page in aspx page

concatenating two word files

how to trace into a dll?

structure data type

convert.int32

timer problem

remove [] lether in textbox ?

find page number in word file thru .net

newbie???

how to drag and drop database table to generate xml schema file?

using aspnetdb.mdf or not?...this is the question...

alternative to autonumber?

use value of variable from codebehind file in ascx

image control from bitmap object

tabbing through text boxes on a web form

what's the best ecommerce solution?

vs.net cds

debugging using visual studio 2005

code behind, what else i need to be aware of?

asp.net not supported by server

   
  Privacy | Contact Us
All Times Are GMT