One thing I see is that you should be calling your server methods using "TryThis.GetString()" since that is the namespace you gave it. 

Have you downloaded fiddler yet?  www.fiddlertool.com.

Finally, where is your .cs file located?  Should be in "AppCode"...

The library is a cinch to get running and using, we'll get it straight for you.

On 7/5/06, Jeremy <[EMAIL PROTECTED]> wrote:

Hello all,

I'm having a very difficult time getting started with AJAX .NET, and
I'm about to give up.  I've read both Joseph Guadagno's documentation
material as well as the "Quick Guide" written by the author of the AJAX
.NET library.  Neither have been a whole lot of help.  I can see from
some of the questions in this group that others have found a way to
create apps with AJAX .NET.  For the life of me, I can't imagine how
they figured out how to do this.

All I want to do is pull some text from the server and output it in
_javascript_.  I imagine that this is one of the simplest things you can
do in AJAX.  I just want to have a single function in my page class
that returns a string, and I want to pull this string from my webpage
without having to do a full page refresh.  Yet, try as I might, I just
can't get it to work.

Everything compiles fine, but the method in my page class never fires.
I'm really at a loss here.  I've tried to dissect the examples in the
various starter kits, but this has led me nowhere.  The starter kits
are too complex, and involve a bunch of complex _javascript_ that I don't
understand.  I'm trying to do something really easy, and nowhere in the
starter kits does anybody accomplish what I'm trying to do without
doing a bunch of fancy stuff (as in the Interval example).

Here is the code in my aspx.cs :

[AjaxPro.AjaxNamespace("TryThis")]
public partial class TryAgain : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax (typeof(TryAgain));
    }

    [AjaxPro.AjaxMethod]
    public string GetString()
    {
        return "Hi dee ho!";
    }
}

Here is the _javascript_ code that I embedded in my .aspx :

<script>
        function GetString()
        {
            TryThis.TryAgain.GetString(GetString_Callback)
        }

        function GetString_Callback(response)
        {
             document.write(response.value);
        }
</script>

I have tried many, many various permutations of this, and I get the
same problem every time.  Inside my page class, my GetString() method
is never called.  Does anybody know why this is happening?

Thank you for your help.



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