<script src="" type="text/_javascript_"></script>
<script src="" type="text/_javascript_"></script>
<script src="" type="text/_javascript_"></script>
<script src="" type="text/_javascript_"></script>
<!-- End AjaxPro Script -->
Use this on your aspx..
remove type register on your Page_Load...
On 8/5/06, huzhengtaoâ„¢ <
[EMAIL PROTECTED]> wrote:
[default.aspx ]
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<html xmlns="http://www.w3.org/1999/xhtml " >
<head runat="server">
<title>my ajax page</title>
<script type="text/_javascript_">
function getTime(){
alert(_Default.GetServerTime.value);
}
</script>
</head>
<body>
<input type="submit" />
</body>
</html>
[default.aspx.cs]
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts ;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default));
}
[AjaxPro.AjaxMethod()]
public DateTime GetServerTime()
{
return DateTime.Now;
}
}
[web.config]
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<httpHandlers>
<add verb="*" path="ajaxpro/*.ashx"
type=" AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
</httpHandlers>
</system.web>
[error]
_Default not found.
please help me!!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info/
Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---
- [ajaxpro] Re: AjaxMethod not found!!!!!!!!!!!!!!!!!!!!... thetim
- [ajaxpro] Memory leak? Costin Manda
- [ajaxpro] Re: AjaxMethod not found!!!!!!!!!!!!!!!... Rizal Ricky Rumanda
