473,396 Members | 2,014 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,396 software developers and data experts.

iframe problem

Hi, please, can somebody help me with this? I have an iframe on a form.
I need to add "runat=server" to the iframe tag to convert to a HTML
Server control. When I do that I get the error CS1012: "Too many
characters in character literal" when I try to compile the project.
Here's the line in the code:

<iframe id="iframe" runat="server" name="i-frame" align="middle"
marginWidth="1" src="getpage.aspx?pid=1" frameBorder="1" width="100%"
onload="parent.addItems(parent.frames['iframe'].window.document);InitDataBoundTable();"
height="396"></iframe>

The length of the line is not the issue. I tried making the line
shorter by removing some of the other attributes but that didn't help.
Removing the "runat=server" fixes the problem.

thanks,

sean

Nov 17 '05 #1
6 4672
Hi,

How are you declaring the iframe in the code behind?

it should be HtmlGenericControl , I have never made reference to an iframe,
so not sure if you can even do it (probably yes), are you sure you are not
missing|excesing a "
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"seans" <se******@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi, please, can somebody help me with this? I have an iframe on a form.
I need to add "runat=server" to the iframe tag to convert to a HTML
Server control. When I do that I get the error CS1012: "Too many
characters in character literal" when I try to compile the project.
Here's the line in the code:

<iframe id="iframe" runat="server" name="i-frame" align="middle"
marginWidth="1" src="getpage.aspx?pid=1" frameBorder="1" width="100%"
onload="parent.addItems(parent.frames['iframe'].window.document);InitDataBoundTable();"
height="396"></iframe>

The length of the line is not the issue. I tried making the line
shorter by removing some of the other attributes but that didn't help.
Removing the "runat=server" fixes the problem.

thanks,

sean

Nov 17 '05 #2
Hi,

How are you declaring the iframe in the code behind?

it should be HtmlGenericControl , I have never made reference to an iframe,
so not sure if you can even do it (probably yes), are you sure you are not
missing|excesing a "
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"seans" <se******@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi, please, can somebody help me with this? I have an iframe on a form.
I need to add "runat=server" to the iframe tag to convert to a HTML
Server control. When I do that I get the error CS1012: "Too many
characters in character literal" when I try to compile the project.
Here's the line in the code:

<iframe id="iframe" runat="server" name="i-frame" align="middle"
marginWidth="1" src="getpage.aspx?pid=1" frameBorder="1" width="100%"
onload="parent.addItems(parent.frames['iframe'].window.document);InitDataBoundTable();"
height="396"></iframe>

The length of the line is not the issue. I tried making the line
shorter by removing some of the other attributes but that didn't help.
Removing the "runat=server" fixes the problem.

thanks,

sean

Nov 17 '05 #3
Hi Ignacio thanks for your reply. The iframe is declared as a
HtmlGenericControl.

I think the 'onload' may be the issue as onload is not an attribute of
iframe.

cheers.
sean.

Nov 17 '05 #4
Hi Ignacio thanks for your reply. The iframe is declared as a
HtmlGenericControl.

I think the 'onload' may be the issue as onload is not an attribute of
iframe.

cheers.
sean.

Nov 17 '05 #5
The problem is that "onload" is not an attribute of iframe. Is there a
way to declare that the onload is a JavaScript event and not an iframe
attribute?

thanks again.

sean

Nov 17 '05 #6
The problem is that "onload" is not an attribute of iframe. Is there a
way to declare that the onload is a JavaScript event and not an iframe
attribute?

thanks again.

sean

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
7
by: Christopher J. Hahn | last post by:
I'm trying to use a script-generated form to submit to a script-generated iframe. The problem I'm running into is that the iframe is not assuming the name I assign it. IE6 on Win2000. FF1.0.2+...
12
by: wangzx | last post by:
I am the author of easyajax.sourceforge.net, and I have a problem on Firefox 1.5, I post the problem here and hopes somebody help me. The test page can be:...
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>
1
by: jaktharkhan | last post by:
Hi, I really really need help in trying to figure out how can I do a CloneNode on an Iframe where the cloned IFRAME clones with all its contents?. Basically what I am doing is dynamically building...
7
by: nicknack | last post by:
Hi. I have a strange problem wuth IFRAME. I have page aaa.aspx with an IFRAME that contain page bbb.aspx. page bbb.aspx sometimes redirect him self to page ccc.aspx. The problem is that...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.