AjaxPro 行: 错误: “xx”未定义
调试时有错误
行: 错误: “xx”未定义
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" language="javascript" >
function display() {
document.getElementById("浮石").value = xx._Default.ajaxOutput("浮石").value;
document.getElementById("浮石").style.visibility = "visible";
}
</script>
<title>示例</title>
</head>
<body onload="display()">
namespace xx
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(xx._Default));
}
public string outputdata(string str1)
{
//略
}
[AjaxPro.AjaxMethod]
public string ajaxOutput(string str)
{
return outputdata(str);
}
}
}
<system.web>
<httpHandlers>
<add verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
</httpHandlers>
<compilation debug="true" targetFramework="4.0">
<assemblies>
请问如何解决?谢谢!
[解决办法]
之前我用VS2012创—emo的时候碰到过此问题,结果找了好久,是因为framework4.5 自带一个 IIS Express 启动.. 把它换掉就好了