Why ASP <%@ %> does not work

Yann Schwartz yartz at imaginet.fr
Mon Feb 19 02:06:02 EST 2001


On Mon, 19 Feb 2001 04:22:34 GMT, costas at springmail.com (Costas
Menico) wrote:

>
>Hi,
>
> I am trying to execute the following page in PWS which contains
>Python ASP. However it does not execute to display the "text".
> I have installed the latest  ActivePython .  Is there some registry
>setting that I should be dong? I know <SCRIPT language=Python> works.
>
><html>
><head></head>
><body>
><h1>Querying database</h1>
><%@ LANGUAGE = Python%>
><%
>text="abc"
>%>
><%= text%>
></body>
></html>
>
>Any ideas?
>Thanks

The compilation directive
<%@LANGUAGE=FOO%>
must be the first line of the ASP script (even before any HTML). Using
Python or not has nothing to do with it.

Your page should look like :

><%@ LANGUAGE = Python%>
><html>
><head></head>
><body>
><h1>Querying database</h1>
><%
>text="abc"
>%>
><%= text%>
></body>
></html>



More information about the Python-list mailing list