无法运行asp文件。而不是被提示下载说asp文件 [英] Unable to run asp file. Instead being prompted to download said asp file

查看:274
本文介绍了无法运行asp文件。而不是被提示下载说asp文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我有我的html code有输入一个名字和姓氏的形式。我已经设置了输入类型为提交并设置动作属性为asp文件。然而,当我点击提交按钮,我布劳尔显示我一个对话框,询问我是否想下载该ASP文件。

Currently, I have my html code have a form that inputs a first and last name. I have set the input type as submit and set the action attribute as the asp file. However, when I click the submit button, my brower shows me a dialog box and asks if I wanted to download the said asp file.

下面是HTML code:

Here is the html code:

<!DOCTYPE html>
<html>
<body>

<form action="test1.asp" method="get">
First Name: <input type="text" name="firstname" /><br />
Last Name: <input type="text" name="lastname" /><br />
<input type="submit" value="Add Customer" />
</form>

</body>
</html>

我已经研究了提交表单上,但我的形式code看起来几乎完全一样本网站上的code:的 http://www.w3schools.com/html/html_forms.asp

我还看到一个问题,类似于我有这个问题:

I have also seen a question that is similar to the problem I am having:

<一个href=\"http://stackoverflow.com/questions/1735133/asp-file-download-of-asp-page-comes-instead-of-executing-it\">ASP :ASP页面的文件下载来执行它而不是

但是,在这种情况下,ASP文件正在执行本身,而我试图通过HTML表单来执行ASP文件。

However, in that scenario, the asp file is being executed itself, while I am trying to execute the asp file through a html form.

与往常一样,任何和所有帮助grealty AP preciated。

As always, any and all help is grealty appreciated.

推荐答案

经典ASP是不是默认安装在IIS 7.0和IIS 7.5,看到的这里和的此处看到如何启用它,如果这是你的情况。

Classic ASP is not Installed by default on IIS 7.0 and IIS 7.5, see here and here to see how to enable it if this is the case for you.

从这些链接复制:

在IIS 7.0和7.5,ASP的经典版本不是默认安装的。正因为如此,你可能会看到HTTP 404错误,当您尝试浏览ASP页的服务器上,你可能会看到源$ C ​​$ C在浏览器窗口中显示的ASP页。当未安装用于定义传统的ASP的环境的配置设置这两种错误条件被创建。

In IIS 7.0 and 7.5, the classic version of ASP is not installed by default. Because of this, you might see HTTP 404 errors when you try to browse to an ASP page on your server, or you might see the source code for your ASP page displayed in your browser window. Both of these error conditions are created when configuration settings that are used to define the environment for classic ASP are not installed.

希望这有助于。

这篇关于无法运行asp文件。而不是被提示下载说asp文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆