473,378 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2368
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: no spam | last post by:
Hi, I have googled on this but can't find the answer. I am writting a page that will be viewed with Firefox .9 or >, and mainly with IE 6, where I need to update pieces of the page without...
6
by: SF RVN | last post by:
I have searched NUMEROUS sources in an effort to find the magic (script, styles, syntax, etc.) that will allow me to create a web page with the following format: ...
2
by: Marcel Balcarek | last post by:
Hi, Is there a way in .NET to convert InnerHtml text e.g. '<B>hello</B>' to 'hello' ?? In IE I can use myiframe.innerText to know whether a field is empty, but in Netscape this method is not...
13
by: ukrbend | last post by:
I'm new to Javascript and to html and am trying to make the following code snippet work but it doesn't. It refuses to call the getPage() function and I always get a 404 error. I know the code is...
26
by: shlomi.schwartz | last post by:
using this example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Test Page</title> </head>
4
by: Yansky | last post by:
Is it possible to read the DOM of an iframe if the iframe's src is from another domain? I realise I can't manipulate the DOM from another domain for security reasons, but can I access the DOM...
8
by: dancer | last post by:
Using ASP.net 1.1 to create user input form. When I put a RequiredFieldValidator I have extra space at the bottom of the cell, as if I had put a <br>. When I comment out the...
1
by: Sura | last post by:
Hi I have a flash interactive window which has html links and this appears on an html page. This window can be moved with the mouse on the html page. The html page has an iFrame too. When the...
0
by: mem | last post by:
Hello, I'm a novice at this and am trying to solve a problem reference IFrame. The following code is for a page I've created. It works well with two exceptions. The IFrame is an application hosted...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.