CodeVerge.Net Beta


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

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 12/5/2007 9:18:54 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 25 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
andy_89
Asp.Net User
How do I load an iframe into a ContentHolderPlace from a masterpage?12/5/2007 9:18:54 PM

0/0

Hello!

My problem is:

 I have made a masterpage with 3 contents. Content_1, Content_2, Content_3.

I have 5 buttons. Button1, ....., Button5.

When I press on Button1 I want to load an iframe (iframe_1) in Content_3.

So in conclusion how to load an iframe into a content from a masterpage.

I want a sample in C# please!

 

Have a nice day!

fedailr
Asp.Net User
Re: How do I load an iframe into a ContentHolderPlace from a masterpage?12/6/2007 12:35:05 AM

0/0

make it by multi placeholder or by visable label


j6rb.com


Amanda Wang - M
Asp.Net User
Re: How do I load an iframe into a ContentHolderPlace from a masterpage?12/7/2007 6:52:03 AM

0/0

Hi,

Base on your description, you want to load an iframe into a contentplacehloder when you click a button, right?

You can try to use javascript to create an iframe,  but you cannot add the content into the contentplaceholder directly, you can put a div control in the contentplaceholder and load the iframe in the div.

For eaxcmple:

 <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick ="createIframe();return false;" />
              
<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server"><div id="xx"></div></asp:ContentPlaceHolder> 

Javascript code:

function createIframe()
{
    document.getElementById('xx').innerHTML = '<iframe name="ifrm" src="http://www.google.com/"></iframe>';
}

Because you load the iframe into the contentplaceholder, so you should make sure the contentplceholder cannot be overrided by the content page,  or else the default content of the contentplaceholder will be convered by the content page. (The more about this you can read this article:  http://quickstarts.asp.net/QuickStartv20/aspnet/doc/masterpages/default.aspx).

 

Hope it helps.

 notice:


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
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:





Search This Site:










can't pass parameter to stored proc from treeview control

updatepanel and masterpage

physically adding sitemap node

regarding menu control styles

css control adapters

javascript and treeview_togglenode

how to manually clear sitemap?

treeview expand/collapse problem

menu style problem

masterpage design for the future faster development

server.htmlencode not working in masterpage environment

how to set meta tags while using master page?

problem: masterpage + external css file

is masterpage only apply to pages? not usercontrols?

designer support for nested masters

what i see is not what i get!!! (cell's borders and css styles)

how can i embed *.swf file in a matster page menu

masterpage - contentplaceholder

image not displaying correctly with css

someone with ie6 please help!

i have a secured folder with some pages in it but the master page that created them is not. results, my pages in the folder are not displaying right

master file does not exist

web page

visual web developer express - image display problem

menu itemclick and navigateurl

asp.net2.0 menu controls for content pages

content page blocking dynamic menu on master page

how to override <menu> default output & have a css stylesheet control all rendering

dynamically inserting nodes into sitemap

treeview ontreenodepopulate tree populate error

  Privacy | Contact Us
All Times Are GMT