Daehan Chi
Daehan Chi

Reputation: 1

html doesn't read my ASP start tag

I have .html file with asp code inside.

<html>
<body>
<%
Request.write("hello")
%>
</body>
</html>

and this prints <% Request.write("hello") %>

I believe ASP is activated because it works when I renamed it to test.asp.

But What I'm trying to do is to encapsulate the asp code inside of html file.

Upvotes: 0

Views: 137

Answers (1)

David
David

Reputation: 218837

I believe ASP is activated because it works when I renamed it to test.asp.

Then rename the file to test.asp.

By default server-side code is processed in .asp files, not .html (or any other) files. Ideally, you don't want to change that as it adds a lot of unnecessary overhead to the web server. You can configure the web server (depending on the web server) to also process other file types, but again it's not recommended.

Additionally, I believe you meant this:

Response.write("hello")

Writing to the request doesn't really make much sense.

Upvotes: 2

Related Questions