Solved

Client-Side Callback & Ajax

Posted on 2011-09-27
2
342 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
ID: 36709939
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
ID: 36710021
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

821 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