468,309 Members | 1,107 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,309 developers. It's quick & easy.

Iframe extra space

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.

Sep 6 '06 #1
2 2204
I see that the following code is created after IFrame:

<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUJNzgzNDMwNTMzZGSx14spmB/6CqhxtWIl52fa9pfc2w==" />
</div>

Any clues now?

Sep 6 '06 #2
Rob
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="stylesheet" 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" <in**************@yahoo.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
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.

Sep 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by no spam | last post: by
6 posts views Thread by SF RVN | last post: by
2 posts views Thread by Marcel Balcarek | last post: by
13 posts views Thread by ukrbend | last post: by
26 posts views Thread by shlomi.schwartz | last post: by
4 posts views Thread by Yansky | last post: by
8 posts views Thread by dancer | last post: by
reply views Thread by mem | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.