Solved

Client-Side Callback & Ajax

Posted on 2011-09-27
2
339 Views
Last Modified: 2012-05-12
Can we say taht client-side callback is equal to "Ajax"?
They have the same function but just different terms?

Thanks.
0
Comment
Question by:zhshqzyc
2 Comments
 
LVL 8

Accepted Solution

by:
jagrut_patel earned 500 total points
Comment Utility
AFAIK, yes funtionally Client-side callback = AJAX.

I have heard of Client-side callback only in MS world. AJAX is more global terminology.
0
 

Author Comment

by:zhshqzyc
Comment Utility
Can we say the following code is a lagacy skill? Since we have ajax, we can use a different way to write code.
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class WSCallback : System.Web.UI.Page,
   System.Web.UI.ICallbackEventHandler
{
    private string _callbackResult = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        string cbReference = Page.ClientScript.GetCallbackEventReference(this,
           "arg", "GetTempFromServer", "context");
        string cbScript = "function UseCallback(arg, context)" +
           "{" + cbReference + ";" + "}";

        Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
           "UseCallback", cbScript, true);
    }

    public void RaiseCallbackEvent(string eventArg)
    {
        // You will need to make a reference to an external web service for this to work
        // Weather.TemperatureService ws = new Weather.TemperatureService();
        // _callbackResult = ws.getTemp(eventArg).ToString();
    }

    public string GetCallbackResult()
    {
        return _callbackResult;
    }
}

Open in new window

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now