Chủ đề này đã được lưu trữ. Vui lòng hỏi một câu hỏi mới nếu bạn cần giúp đỡ.
ASP-page doesn't show correct, but just show the code
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
Tất cả các câu trả lời (1)
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.