Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Client-Side Callback & Ajax

Posted on 2011-09-27
2
Medium Priority
?
349 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 2000 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

926 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