Why ASP <%@ %> does not work

Greg Jorgensen gregj at pobox.com
Mon Feb 19 02:18:13 EST 2001


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

> 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>

Does your file have a .asp extension? It should.

Are you sure the Python is executing in the server, and not in the
client (which may be the same machine in your case)? Does this work:

<html>
<head></head>
<body>
<script language=Python runat=server>
Response.Write("<H2>hello, world</H2>")
</script>
</body>
</html>

If it does, then this should work, too:

<%@ language=Python %>
<html>
<head></head>
<body>
<%
Response.Write("<H2>hello, world</H2>")
%>
</body>
</html>

It works for me without any trouble.

Greg Jorgensen
Deschooling Society
Portland, Oregon USA



More information about the Python-list mailing list