client side:

      chat2.SendMsg(groupid,str,function  (res)     {if(res.value !=
null&&res.value!=true){alert("对不起,消息发送失败,请重试!!
" ); }});

server side:


  protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(chat2));
    }

 [AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.ReadWrite)]
    public bool SendMsg(string receiver, string msg)
    {
        bool b = false;
        try
        {
            MyChat.improve.SendMsg(Context, receiver, msg);
            b = true;
        }
        catch (Exception e) { }
        return b;
    }



 I AM sure "MyChat.improve.SendMsg(Context, receiver, msg)"  work
properly.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to