Showing posts with label src. Show all posts
Showing posts with label src. Show all posts

Monday, March 26, 2012

The Controls collection cannot be modified because the control contains code blocks (i.e.

Hi,

I'm trying to dynamically set the src of an iframe with the <% %> block:
<iframe id="content" src="http://pics.10026.com/?src=<% = Request.QueryString.Get("content") %>"
width="100%"></iframe
Notice that the tag (intentionally) has no runat=server and also nested in a
<TD> tag...

What am I doing wrong?

Thanks,
HadarHadar,

Looks like you have a balagan with quotes. Try this:
src=<% = String.Format ("'{0}'", Request.QueryString.Get("content") %
Eliyahu

"Hadar" <crazy5@dotnet.itags.org.bezeqint.net> wrote in message
news:uB23lzJlEHA.208@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> Hi,
> I'm trying to dynamically set the src of an iframe with the <% %> block:
> <iframe id="content" src="http://pics.10026.com/?src=<% = Request.QueryString.Get("content") %>"
> width="100%"></iframe>
> Notice that the tag (intentionally) has no runat=server and also nested in
a
> <TD> tag...
> What am I doing wrong?
> Thanks,
> Hadar
One more bracket:

src=<% = String.Format ("'{0}'", Request.QueryString.Get("content")) %
--
Eliyahu

"Eliyahu Goldin" <removemeegoldin@dotnet.itags.org.monarchmed.com> wrote in message
news:exsYv2KlEHA.3372@dotnet.itags.org.TK2MSFTNGP09.phx.gbl...
> Hadar,
> Looks like you have a balagan with quotes. Try this:
> src=<% = String.Format ("'{0}'", Request.QueryString.Get("content") %>
> Eliyahu
> "Hadar" <crazy5@dotnet.itags.org.bezeqint.net> wrote in message
> news:uB23lzJlEHA.208@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> > Hi,
> > I'm trying to dynamically set the src of an iframe with the <% %> block:
> > <iframe id="content" src="http://pics.10026.com/?src=<% = Request.QueryString.Get("content") %>"
> > width="100%"></iframe>
> > Notice that the tag (intentionally) has no runat=server and also nested
in
> a
> > <TD> tag...
> > What am I doing wrong?
> > Thanks,
> > Hadar
Hi Eliyahu,

Thanks for your reply.
I tried what you suggested, and still it doesn't work (same error).
I guess it's not the quotes...

Any other suggestions?

Hadar

> One more bracket:
> src=<% = String.Format ("'{0}'", Request.QueryString.Get("content")) %>
> --
> Eliyahu
> "Eliyahu Goldin" <removemeegoldin@dotnet.itags.org.monarchmed.com> wrote in message
> news:exsYv2KlEHA.3372@dotnet.itags.org.TK2MSFTNGP09.phx.gbl...
> > Hadar,
> > Looks like you have a balagan with quotes. Try this:
> > src=<% = String.Format ("'{0}'", Request.QueryString.Get("content") %>
> > Eliyahu
> > "Hadar" <crazy5@dotnet.itags.org.bezeqint.net> wrote in message
> > news:uB23lzJlEHA.208@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > > > I'm trying to dynamically set the src of an iframe with the <% %>
block:
> > > <iframe id="content" src="http://pics.10026.com/?src=<% = Request.QueryString.Get("content")
%>"
> > > width="100%"></iframe>
> > > > Notice that the tag (intentionally) has no runat=server and also
nested
> in
> > a
> > > <TD> tag...
> > > > What am I doing wrong?
> > > > Thanks,
> > > Hadar
> >