日期:2014-05-17 浏览次数:20538 次
<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>