I am generating WML pages from ASP.
I have header.inc that looks like this:
----------------------------------------------
<%@Language=VBScript%><%
Option Explicit
Response.Buffer = True
Response.ContentType = "text/vnd.wap.wml;charset=UTF-8"
%>
[...]
----------------------------------------------
All ASP pages on the site start by including this file.
In index.asp it works, in another ASP it doesn't, and I get the "statement
expected" error.
I did some messing with the encoding of the files, I saved them in UTF-8
(65001)encoding in Visual Studio, then tried to save them again with Windows
Western European (1252) when I found out that this was neccessary. Can this
cause a problem in the server side script? I don't think so, but I cannot
imagine any other reasons why the same sequence of statements work in one
file and don't work in another. 5 2623
"Agoston Bejo" <gu***@freemail.hu> wrote in message
news:#L**************@tk2msftngp13.phx.gbl... I am generating WML pages from ASP. I have header.inc that looks like this:
---------------------------------------------- <%@Language=VBScript%><% Option Explicit Response.Buffer = True Response.ContentType = "text/vnd.wap.wml;charset=UTF-8" %> [...] ----------------------------------------------
All ASP pages on the site start by including this file. In index.asp it works, in another ASP it doesn't, and I get the "statement expected" error.
I did some messing with the encoding of the files, I saved them in UTF-8 (65001)encoding in Visual Studio, then tried to save them again with
Windows Western European (1252) when I found out that this was neccessary. Can
this cause a problem in the server side script? I don't think so, but I cannot imagine any other reasons why the same sequence of statements work in one file and don't work in another.
<!--#include file="header.inc"-->
1) Is the line above the first line in every ASP page?
2) Is the line above in the same folder as all ASP pages?
See the answer below.
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:3M0ld.498247$mD.406610@attbi_s02... "Agoston Bejo" <gu***@freemail.hu> wrote in message news:#L**************@tk2msftngp13.phx.gbl... I am generating WML pages from ASP. I have header.inc that looks like this:
---------------------------------------------- <%@Language=VBScript%><% Option Explicit Response.Buffer = True Response.ContentType = "text/vnd.wap.wml;charset=UTF-8" %> [...] ----------------------------------------------
All ASP pages on the site start by including this file. In index.asp it works, in another ASP it doesn't, and I get the
"statement expected" error.
I did some messing with the encoding of the files, I saved them in UTF-8 (65001)encoding in Visual Studio, then tried to save them again with Windows Western European (1252) when I found out that this was neccessary. Can this cause a problem in the server side script? I don't think so, but I
cannot imagine any other reasons why the same sequence of statements work in
one file and don't work in another.
<!--#include file="header.inc"-->
1) Is the line above the first line in every ASP page?
Yes.
2) Is the line above in the same folder as all ASP pages?
Yes.
Actually, I found something on the internet about this, and it says this
error may occur if you try to use undefined variables. (But as far as I
know, you'll get another error in that case, so it's kind of confusing.)
"Agoston Bejo" <gu***@freemail.hu> wrote in message
news:#L**************@TK2MSFTNGP12.phx.gbl... See the answer below.
"McKirahan" <Ne**@McKirahan.com> wrote in message news:3M0ld.498247$mD.406610@attbi_s02... "Agoston Bejo" <gu***@freemail.hu> wrote in message news:#L**************@tk2msftngp13.phx.gbl... I am generating WML pages from ASP. I have header.inc that looks like this:
---------------------------------------------- <%@Language=VBScript%><% Option Explicit Response.Buffer = True Response.ContentType = "text/vnd.wap.wml;charset=UTF-8" %> [...] ----------------------------------------------
All ASP pages on the site start by including this file. In index.asp it works, in another ASP it doesn't, and I get the "statement expected" error.
I did some messing with the encoding of the files, I saved them in
UTF-8 (65001)encoding in Visual Studio, then tried to save them again with Windows Western European (1252) when I found out that this was neccessary. Can this cause a problem in the server side script? I don't think so, but I cannot imagine any other reasons why the same sequence of statements work in one file and don't work in another.
<!--#include file="header.inc"-->
1) Is the line above the first line in every ASP page?
Yes.
2) Is the line above in the same folder as all ASP pages?
Yes.
Actually, I found something on the internet about this, and it says this error may occur if you try to use undefined variables. (But as far as I know, you'll get another error in that case, so it's kind of confusing.)
What happens if you remove the following line?
Response.ContentType = "text/vnd.wap.wml;charset=UTF-8"
I'm not familiar with the MIME type "vnd.wap.wml".
Also, you don't need "Response.Buffer = True" with ASP 3.0 as it's the
default.
Agoston Bejo wrote: Actually, I found something on the internet about this, and it says this error may occur if you try to use undefined variables. (But as far as I know, you'll get another error in that case, so it's kind of confusing.)
Yes, that error is possible if you refer to an undefined variable in such a
was as to make it look like a call to a statement. Without seeing the code,
we can't help you debug this.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Do the other pages have Option Explicit in them too? You can only have one,
include file or not.
If you're worried about the encoding, simply create a new file of the
correct encoding, paste the code, and delete the original.
Jeff
"Agoston Bejo" <gu***@freemail.hu> wrote in message
news:#L**************@tk2msftngp13.phx.gbl... I am generating WML pages from ASP. I have header.inc that looks like this:
---------------------------------------------- <%@Language=VBScript%><% Option Explicit Response.Buffer = True Response.ContentType = "text/vnd.wap.wml;charset=UTF-8" %> [...] ----------------------------------------------
All ASP pages on the site start by including this file. In index.asp it works, in another ASP it doesn't, and I get the "statement expected" error.
I did some messing with the encoding of the files, I saved them in UTF-8 (65001)encoding in Visual Studio, then tried to save them again with
Windows Western European (1252) when I found out that this was neccessary. Can
this cause a problem in the server side script? I don't think so, but I cannot imagine any other reasons why the same sequence of statements work in one file and don't work in another.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: biro man |
last post by:
I have a dynamic database driven page that I have been working on and
tweaking etc until I have got it to work pretty much the way I want it to.
I also have a defined website. I wish to include...
|
by: Robert Mark Bram |
last post by:
Hi All!
I have the following in a vb script:
option explicit
Response.Expires = -1
Server.ScriptTimeout = 600
The script gets imported in the following way:
<script language="VBscript"...
|
by: Captain Nemo |
last post by:
If you look around on the web for advice on cache-control and using 'Option
Explicit' you get a paradox.
Both features are supposed to be the first piece of ASP code on the page.
Well they...
|
by: Mats |
last post by:
Option Explicit does not work anymore.(?)
If you put <%option explicit%> at the top of your pages (direktly after
the language declaration) you should get an error for each undeclared
variable....
|
by: Microsoft News |
last post by:
I have a project that was created all with Option Strict OFF. Works great,
not a problem with it. But if I turn Option Strict ON then I get a LOT of
errors.
My question, should I even care...
|
by: zacks |
last post by:
A common programming technique I use in VB is making a collection of
structures. But if Option Strict is on (which I would prefer), the .Add
that adds the structure to the collection is flagged...
|
by: John Kotuby |
last post by:
Hi all,
I am simply trying to include the Option Explicit declaration at the top of
an ASP page and am getting an error:
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected...
|
by: John |
last post by:
Hi
I have a vs 2003 project which I have just imported into vs 2005. Now I am
getting the "Option Strict On disallows operands of type Object for operator
'='. Use the 'Is' operator to test for...
|
by: ARC |
last post by:
Ok, this is strange. I created a new database and imported all objects from
the old program file.
Form some reason, the option explicit statement is no longer showing in my
code modules (and I...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |