Click here to Skip to main content
15,071,729 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys


I have 2 aspx pages, and a master page.
I know frames are evil but i used them to combine the 2 aspx pages inside the master page. Now i created a 3rd aspx page and used the master page and it works but i cant find my controls inside content placeholder of my 3rd aspx form.

Help if possible!!!!

Below is my first aspx Page

XML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContentPage.aspx.cs" Inherits="Data_ContentPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="main">
<!-- header -->
  <div id="header">
  <div id="loggo">
  </div>
<!-- / header -->

<div class="cont_top"></div><!--Top round corners-->

<!-- content -->
<div id="content">
        Hello there
</div>
<!-- /content -->

<div class="cont_bot"></div><!--Bottom round corners-->

      </div><!--End main-->
  </div><!--End Header-->
</body>
</html>


Below is my second aspx page with javascript

XML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Outlook.aspx.cs" Inherits="Data_Outlook" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="outlook.js" type="text/javascript"></script>
    <script src="crossbrowser.js" type="text/javascript"></script>
    <SCRIPT>
        // ---------------------------------------------------------------------------
        // Example of howto: use OutlookBar
        // ---------------------------------------------------------------------------

        //create OutlookBar
        var o = new createOutlookBar('Bar', 0, 0, screenSize.width, screenSize.height, '#fff', 'red')//'#000099') // OutlookBar
        var p
        //create first panel
        // p.addButton('netm.gif','Netmanage');
        //window.open("index.html")
        //window.location="index.html"
        p = new createPanel('l2', 'Scheduling');
        p.addButton('calSche.jpg', 'Add Scheduling', 'alert("Adresse")');
        p.addButton('ViewSche.jpg', 'View Scheduling', 'alert("Adresse")');
        o.addPanel(p);
        p = new createPanel('al', 'Monitoring');
        p.addButton('Doc.jpg', 'View Health Records', 'window.open("index.html")');
        p.addButton('nurse.jpg', 'Add Health Status', 'alert("News")');
        o.addPanel(p);
        p = new createPanel('p', 'Medication');
        p.addButton('mail.gif', 'Prescibe Medication', 'alert("Mail2")');
        p.addButton('peditor.gif', 'Treatment Plan', 'alert("Personal Editor")');
        o.addPanel(p);
        p = new createPanel('l', 'Health Record');
        p.addButton('news.gif', 'Adresse', 'alert("Adresse")');
        p.addButton('mail.gif', 'Postausgang', 'alert("Postausgang")');
        p.addButton('mail.gif', 'Posteingang', 'alert("Posteingang")');
        o.addPanel(p);

        p = new createPanel('l3', 'Reports');
        p.addButton('news.gif', 'Adresse', 'alert("Adresse")');
        p.addButton('mail.gif', 'Postausgang', 'alert("Postausgang")');
        p.addButton('mail.gif', 'Posteingang', 'alert("Posteingang")');
        o.addPanel(p);

        o.draw();         //draw the OutlookBar
        //-----------------------------------------------------------------------------
        //functions to manage window resize
        //-----------------------------------------------------------------------------
        //resize OP5 (test screenSize every 100ms)
        function resize_op5() {
            if (bt.op5) {
                o.showPanel(o.aktPanel);
                var s = new createPageSize();
                if ((screenSize.width != s.width) || (screenSize.height != s.height)) {
                    screenSize = new createPageSize();
                    //need setTimeout or resize on window-maximize will not work correct!
                    //benötige das setTimeout oder das Maximieren funktioniert nicht richtig
                    setTimeout("o.resize(0,0,screenSize.width,screenSize.height)", 100);
                }
                setTimeout("resize_op5()", 100);
            }
        }
        //resize IE & NS (onResize event!)
        function myOnResize() {
            if (bt.ie4 || bt.ie5 || bt.ns5) {
                var s = new createPageSize();
                o.resize(0, 0, s.width, s.height);
            }
            else
                if (bt.ns4) location.reload();
        }
</SCRIPT>
</head>
<body onLoad="resize_op5();" onResize="myOnResize();">
</body>
</html>


Below is my master Page

XML
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPg.master.cs" Inherits="MasterPg" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
    <title></title>
</head>
<frameset  cols = "200,*" frameborder="yes" bordercolor="silver" border="0">
     <frame SRC="Data/Outlook.aspx" name="Links" scrolling="No">
     <frame SRC="Data/ContentPage.aspx" name="main" scrolling="AUTO">
  </frameset>
<noframes>
<body>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
</body>
</noframes>
</html>



Now Below is my 3rd page with contentplace Holder and whn I use the
for my controls it just dont work

XML
<%@ Page Language="C#" MasterPageFile="~/MasterPg.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="Content1" runat="server"
    contentplaceholderid="ContentPlaceHolder1">
</asp:Content>


Hope this helps
Posted
Updated 27-May-11 0:24am
v2
Comments
R. Giskard Reventlov 27-May-11 6:02am
   
Need more info: not enough here to enable anyone to help you. When you ask a question imagine if it was someone asking you the same question: is there enough information for you to give a meaningful answer?
Sergey Alexandrovich Kryukov 27-May-11 13:38pm
   
Just a note: nobody managed to convince me that frames are evil. Does anyone know serious arguments against them? Any references?
--SA

1 solution

http://www.dreamincode.net/forums/topic/16442-div-vs-frames/[^]

See if this site convinces you whether divs or frames are the way you need to go....
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900