|
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page, ICallbackEventHandler
{
string callbackResult;
protected void Page_Load(object sender, EventArgs e)
{
string cbref = Page.ClientScript.GetCallbackEventReference(this, "arg", "JSCallback", "context");
//Response.Write(cbref);
string cbScr = string.Format("function UseCallBack(arg, context) {{ {0}; }} ", cbref);
// Response.Write("<BR>" + cbScr);
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "UseCallBack", cbScr, true);
}
#region ICallbackEventHandler Members
public string GetCallbackResult()
{
return callbackResult;
}
public void RaiseCallbackEvent(string eventArgument)
{
// perform some real operation
callbackResult = "DotNET Rocks!";
}
#endregion
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Iam Nasir Ali Khan, working a software architect in Dubai, works primarily on Microsoft Platform, MCTS certified for windows/web/distributed/mobile/enterprise applications.
Also teaches CS courses in a university in dubai.