473,396 Members | 1,714 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.

Server tags cannot contain <% ... %> constructs

<cc:SourceWindow id="SourceWindow1"
FileName="<%=Request.ServerVariables["PATH_INFO"]%>" RunAt="server" >

The above produces the following error:

Server tags cannot contain <% ... %constructs.

Any idea, what to do here? I am an old ASP programmer.

Thanks for help !

LMJ
May 5 '07 #1
3 4671
in your code for loading the page use :

SourceWindow1.FileName = [whatever]

"lm Jr" <lm**@aspdotnet.learnerwrote in message news:O%****************@TK2MSFTNGP04.phx.gbl...
<cc:SourceWindow id="SourceWindow1" FileName="<%=Request.ServerVariables["PATH_INFO"]%>" RunAt="server" >

The above produces the following error:

Server tags cannot contain <% ... %constructs.

Any idea, what to do here? I am an old ASP programmer.

Thanks for help !

LMJ

May 5 '07 #2
"lm Jr" <lm**@aspdotnet.learnerwrote in message
news:O%****************@TK2MSFTNGP04.phx.gbl...
<cc:SourceWindow id="SourceWindow1"
FileName="<%=Request.ServerVariables["PATH_INFO"]%>" RunAt="server" >

The above produces the following error:

Server tags cannot contain <% ... %constructs.

Any idea, what to do here? I am an old ASP programmer.
In your Page_Load method, do this:

SourceWindow1.FileName = Request.ServerVariables["PATH_INFO"]
I strongly suggest you never use the technique you tried above. Substituting
directly into the rendered HTML can cause problems. For example, I've been
fighting today with user controls that do things like this:

<script language="javascript">
function Something()
{
var control = document.getElementById("<%= _someControl.ClientID %>");
}
</script>

This innocent piece of script causes one copy of itself to be created for
each instance on a page of the control containing it. Not a problem if the
script is small and there are few instances, but on one of our pages, each
script block is about 750 lines long, and there are over 10 instances of the
control on the same page. It adds up.

Good luck with ASP.NET. Please feel free to ask for help on these
newsgroups, and please try to learn the .NET way of doing things - there's a
reason why ASP.NET was invented, and that reason is ASP!
--
John Saunders [MVP]
May 5 '07 #3

Thanks for your suggestions. That was really helpful !!

LM J
May 5 '07 #4

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

Similar topics

5
by: Donald Firesmith | last post by:
Are html tags allowed within meta tags? Specifically, if I have html tags within a <definition> tag within XML, can I use the definition as the content within the <meta content="description> tag? ...
8
by: Ike | last post by:
I am hoping someone can help me with the proper syntax for this. I have an attribute, called, say "name," such that: <set name="something">thename</set> However, the value for name, is...
30
by: Toni Mcintyre | last post by:
i'm having 2 problems with the http://validator.w3.org 1. if i have: <meta http-equiv="Content-Script-Type" content="text/javascript"> then why do i need <script type=text/javascript>...
2
by: AES/newspost | last post by:
In a markup like <dd> <br> some other stuff <br> </dd> the first break seems to add a blank line before the other stuff, but the second doesn't add a blank line after the other stuff. The...
5
by: Monty | last post by:
..rowbackgrnd { background-color: #E4E4F2; border-bottom: 1px solid Black; border-left: 1px solid #E4E4F2; border-right: 1px solid #E4E4F2; border-top: 1px solid Black } It works for <td>...
8
by: Peter van Schie | last post by:
Hi all, Give an xml document that looks something like this: <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl"...
5
by: Marcos MOS | last post by:
Hi, I've put a appSetting tag into my web.config, but when I try to catch its value to my Image WebControl occurs the follow error: "Server tags cannot contain <% ... %> constructs." on...
1
by: Neil Zanella | last post by:
Hello, I would like to do the following: <form method="post" action="<%= Request.ServerVariables %>" runat="server"> The reason I would like to do this is twofold:
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
4
by: Mike | last post by:
Hi We are developing an ASP.NET 2.0 application and using the in built Crystal report system that it comes with. We have everything running fine on our development server but when we publish...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
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
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.