Re: Iframe extra space
- From: "Rob" <rmacfadyen_at_gmail.com>
- Date: Wed, 6 Sep 2006 00:00:10 -0400
Mike,
You should be looking into Master Pages.... these will really solve your
header problems.
Here's a sample header page:
<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="SubPages.master.cs" Inherits="MainMenu" %>
<!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>Untitled Page</title>
<link rel="style***" type="text/css" href="~/Styles.css" />
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-93213-7";
if (urchinTracker) urchinTracker();
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
MyHeader
</div>
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</div>
<div>
footer
</div>
</form>
</body>
</html>
It place Google Analytics tracking on all the pages, provides a common
header and a common footer.
Here's a page that uses that header:
<%@ Page Language="C#" MasterPageFile="~/MasterPages/SubPages.master"
AutoEventWireup="true"
CodeFile="BlahBlah.aspx.cs" Inherits="BlahBlah" Title="Page Title" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
runat="Server">
My content
</asp:Content>
All in all much much better than mucking with frames :)
Regards,
Rob
"Mike" <indianmostwanted@xxxxxxxxx> wrote in message
news:1157505852.305072.317570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
All:
I am a newbee to ASP.NET
I have created an aspx webpage for the title bar which I want to use in
other pages in the website.When I use an iframe in webpages to use the
title bar, I get an unknown white space after the titlebar followed by
the regular pages. I use the following syntax in regular webpages to
display the titlebar.
<iframe src="titlebar.aspx" style="width: 100%; height:100%;
margin-bottom:0" frameborder="0" marginheight="0" marginwidth="0"
scrolling="no"></iframe>
Can anyone point out why it is happening?
Please suggest me an alternative code to embed an aspx page into
another one.
Thanx in advance.
.
- References:
- Iframe extra space
- From: Mike
- Iframe extra space
- Prev by Date: RE: 'Could not load file or assembly' every few days - asp.net 1.1
- Next by Date: System.Net.Mail SMTP Pickup Dir
- Previous by thread: Re: Iframe extra space
- Next by thread: Q about ASP speeds
- Index(es):