How Do I: Make Client-Side Network Callbacks with ASP.NET AJAX?

In this video we see how Microsoft ASP.NET AJAX helps web developers make network callbacks directly from client-side script code. We see also how an ASP.NET AJAX-enabled web service generates the JavaScript needed to call the web service.

Presented by Joe Stagner

Duration: 15 minutes, 26 seconds

Date: 26 January 2007

Watch the video   |   Download the video   |   Get VB code  or  C# code

Video downloads: WMV | Zune | iPod | PSP | MPEG-4 | 3GP

Audio downloads: AAC | WMA | MPEG-4 | MPEG-3 | MPEG-2

Comments : 8

Leave a Comment

akourkoumelis : On March 07, 2008 5:32 PM said:

Hi,

Can I invoke server side calls from javascript without invoking a web service?

JoeStagner : On March 15, 2008 12:48 PM said:

Sure - you can use GET and OST directly.

ShijuKadamala : On March 27, 2008 10:35 AM said:

When you are calling web service class from JavaScript, remember to call with full qualifier for the web service class.

darthocellaris : On March 28, 2008 12:12 PM said:

my javascript is weak so correct me here. You misspelled 'return' in the script and the popup still shows. There is an error on the page still though. How is this possible? I would have expected no popup.

eunicep : On April 07, 2008 12:42 AM said:

darthocellaris: I had the same problem encountering javascript error stating 'SimpleService' is undefined.  I figured out that a namespace is needed.  Here, the namespace I used is AJAXEnabledWebSite1.  

ret = AJAXEnabledWebSite1.SimpleService.SayHello(document.getElem entById('Text1').value, OnComplete, OnTimeOut, OnError);

JoeStagner : On April 14, 2008 8:55 PM said:

darth.... browsers handle JS errors differently but often try to keep going, especially if you have client errors turned off in the browser.

anat2403 : On April 20, 2008 1:35 PM said:

Suppose the Name entered is 'Anat' and I want to keep this value in a session field or somewhwere in the server. How can I use the web service to get this value?

Thankyou

Anat

DarkKnight671 : On April 23, 2008 7:50 AM said:

Anat raises an interesting point - is there a way to sync server-controls with what gets changed as a result of the callback? I.E. - if we change a list of values (say, a dropdownlist), viewstate is not updated on the server and any selections may no longer be valid...

Leave a Comment

You must be logged in to leave a comment. Click here to log in.