Hi,

you cannot use document.write, use something like
document.getElementById(...) and the .innerHTML property. Or replace
you document.write statement with an alert and you are fine. If you
are using AjaxPro you have to write JavaScript code. You have to do
this every time you want to write great web sites!

Regards,
Michael

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


-- 
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz/
http://www.schwarz-interactive.de/
mailto:[EMAIL PROTECTED]

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