Hi,
I'm trying to dynamically set the src of an iframe with the <% %> block:
<iframe id="content" src="<% = Request.QuerySt ring.Get("conte nt") %>"
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 3 17742
Hadar,
Looks like you have a balagan with quotes. Try this:
src=<% = String.Format ("'{0}'", Request.QuerySt ring.Get("conte nt") %>
Eliyahu
"Hadar" <cr****@bezeqin t.net> wrote in message
news:uB******** *****@TK2MSFTNG P12.phx.gbl... Hi,
I'm trying to dynamically set the src of an iframe with the <% %> block: <iframe id="content" src="<% = Request.QuerySt ring.Get("conte nt") %>" 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.QuerySt ring.Get("conte nt")) %>
--
Eliyahu
"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:ex******** ******@TK2MSFTN GP09.phx.gbl... Hadar,
Looks like you have a balagan with quotes. Try this: src=<% = String.Format ("'{0}'", Request.QuerySt ring.Get("conte nt") %>
Eliyahu
"Hadar" <cr****@bezeqin t.net> wrote in message news:uB******** *****@TK2MSFTNG P12.phx.gbl... Hi,
I'm trying to dynamically set the src of an iframe with the <% %> block: <iframe id="content" src="<% = Request.QuerySt ring.Get("conte nt") %>" 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.QuerySt ring.Get("conte nt")) %>
-- Eliyahu
"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message news:ex******** ******@TK2MSFTN GP09.phx.gbl... Hadar,
Looks like you have a balagan with quotes. Try this: src=<% = String.Format ("'{0}'", Request.QuerySt ring.Get("conte nt") %>
Eliyahu
"Hadar" <cr****@bezeqin t.net> wrote in message news:uB******** *****@TK2MSFTNG P12.phx.gbl... Hi,
I'm trying to dynamically set the src of an iframe with the <% %>
block: <iframe id="content" src="<% = Request.QuerySt ring.Get("conte nt")
%>" 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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jeff Dockman |
last post by:
Background:
We needed the ability to create a templated web site that may change in
layout from installation to installation. To accomplish this, we created a
base Page class that all pages in the site inherit from. In addition to
providing basic functionality and security, this Page class modifies the
HtmlForm controls collection in the deriving page to manage the page layout.
The Page class adds LiteralControls to manipulate the page...
|
by: Jeremy Ames |
last post by:
I have run into a major road block with my page development projects. I am
trying to add a literal control to my asp.net page and I got an error
stating that the control could not be added because of code blocks (<% %>)
on the page. Most of these blocks can be handled by adding a label control
to the form so it is not that big of deal, but one of the things being
posted is the page title. I am not sure how I can access that from the code...
|
by: Axel Dahmen |
last post by:
HI,
I want to dynamically add controls to a web page from within a common base
class. Unfortunately, ASP.NET fails with "System.Web.HttpException: The
Controls collection cannot be modified because the control contains code
blocks (i.e. <% ... %>)."
All of my pages contain these kind of blocks, for several reasons. For one,
I don't know any other way to dynamically add header information like e.g.
style sheet links to a web page. So, is...
|
by: thomasamillergoogle |
last post by:
Is it possible that my user control can add code to the HEAD of the
parent page that hosts the control?
|
by: John Rivers |
last post by:
Hello,
What good reason there is for not allowing methods in ASPX pages I
can't imagine, but here is how to get around that limitation:
(START)
<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server">
<%
| |
by: Dan |
last post by:
Hi,
I get this error:
"Controls collection cannot be modified because the control contains code
blocks (i.e. <% ... %>). "
when trying to create a table in the code-behind file like this:
dim t as table
t = New Table()
Page.Controls.Add(t)
while the aspx file contains this:
|
by: Zimmergren |
last post by:
I know this has been up on googlegroups before, on several places.
However, I havn't found a solution to this specific problem.
I get this errormessage:
"The Controls collection cannot be modified because the control
contains code blocks (i.e. <% ... %>)."
Which I get because ASP.NET uses <% ... %> tags OUTSIDE the <form> tag,
meaning you can't implement it inside the form tags.
|
by: CyberSoftHari |
last post by:
I am adding dynamic controls in my page through a panel as figured below.
pnlModel.ID = "pnlDyModel";
pnlModel.Controls.Add(lblReportTitle);
pnlModel.Controls.Add(new LiteralControl("<br />"));
pnlModel.Controls.Add(txtReport);
pnlModel.BackColor = System.Drawing.Color.LightBlue;
pnlModel.Width = 580;
pnlModel.Controls.Add(tblInPanel);
...
|
by: Radu |
last post by:
Hi. I am trying to localize a page AND simulate the AJAX watermarks in
it, i.e. the textbox contains the text "Enter your name", or "Entrez
votre nom", for instance, then on click, delete this text, allow
entry, but on deletion of the inputted text show again "Enter your
name", or "Entrez votre nom" depending on the UICulture.
Everything worked great UNTIL I have added a button which posts back.
Now on postback I have the error in the...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |