Am still strugling to get started with the Ajaxpro..
here is the situation, i'm trying to write a very simple code for
getting the Time from the srver.
here is the code:
users.aspx - javascript:
---------------------------------
<script type="text/javascript">
function getServerTime(){
users.usersWebForm.GetServerTime(getServerTime_callback);
}
function getServerTime_callback(res) {
alert(res.value);
}
</script>
users.aspx.cs:
---------------------
[AjaxPro.AjaxNamespace("users")]
public partial class usersWebForm : System.Web.UI.Page
{
[AjaxPro.AjaxMethod]
public DateTime GetServerTime()
{
return DateTime.Now;
}
protected void Page_Load(object Src, EventArgs E)
{
// Register Ajax.NET methods from this class
AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxPro.Services.AuthenticationService));
AjaxPro.Utility.RegisterTypeForAjax(typeof(usersWebForm));
if (IsPostBack)
{}
}
}
------
i get a javascript Error:
users.usersWebForm is Null or not an Object..
any advise ?
Thanks,
Ziv
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---