Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

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

  • 1 trả lời
  • 6 gặp vấn đề này
  • 186 lượt xem
  • Trả lời mới nhất được viết bởi 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

Tất cả các câu trả lời (1)

more options


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.