ajaxpro(.net1.1)
vb:
webconfig:
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro"/>
</httpHandlers>
pageload:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
服务器端的方法如下:
<AjaxPro.AjaxMethod()> _
Public Function test() As String
Dim a As String = "welcome ajaxpro"
Return a
End Function
webform1.aspx中 javascript 如下:
<script type = "text/javascript">
function aa()
{
alert(WebForm1.test().value);
}
</script>
<a href="#" onclick="aa()">welcome ajax</a>
但是提示,找不到WebForm1,请问是不是我哪里配置出错了呢?