Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

ASP-page doesn't show correct, but just show the code

  • 1 reply
  • 6 have this problem
  • 186 views
  • Last reply by gnittala

more options

I have a small file 'Test.asp' with this content: <title>Date-test</title> <%strMsg = "Time is " & Time() & "on the server" response.write strMsg%> Finished

When I open it from the Explorer, FF just shows the text under BODY like: <% strMsg = "Time is" & Time() & "on the server" response.write strMsg %> Finished

The InternetExplorer V10, wants to open the file or download it. It seems as if the browser does not understand that it is an ASP-file. Last week I installed the Servicepack-1 and I have Win-7 Pro

All Replies (1)

more options

Hello,

ASP is a server side scripting language. What this means is that the code you are providing should be executed under a server that provides ASP support. IIS server from Microsoft provides support for ASP pages. In this case, you will need to add this file to the IIS server and then open your webpage using something like - http://localhost/mytest.asp.

I suggest you go through an ASP tutorial to understand how you can create a website using ASP. One of the tutorials is Basic ASP tutorial at W3CTutorial.

Long story short - as you are trying to open a page which has code that is interpreted only by the ASP language, and the browser doesn't understand ASP, the code is displayed as HTML, instead of executing your code.

Hope this helps.