Connecting Tech Pros Worldwide Forums | Help | Site Map

iframe problem

seans
Guest
 
Posts: n/a
#1: Nov 17 '05
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


Ignacio Machin \( .NET/ C# MVP \)
Guest
 
Posts: n/a
#2: Nov 17 '05

re: iframe problem


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" <seanss01@yahoo.com> wrote in message
news:1124789285.658215.150350@f14g2000cwb.googlegr oups.com...[color=blue]
> 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
>[/color]


Ignacio Machin \( .NET/ C# MVP \)
Guest
 
Posts: n/a
#3: Nov 17 '05

re: iframe problem


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" <seanss01@yahoo.com> wrote in message
news:1124789285.658215.150350@f14g2000cwb.googlegr oups.com...[color=blue]
> 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
>[/color]


seans
Guest
 
Posts: n/a
#4: Nov 17 '05

re: iframe problem


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.

seans
Guest
 
Posts: n/a
#5: Nov 17 '05

re: iframe problem


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.

seans
Guest
 
Posts: n/a
#6: Nov 17 '05

re: iframe problem


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

seans
Guest
 
Posts: n/a
#7: Nov 17 '05

re: iframe problem


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

Closed Thread