473,473 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

The new CallBackEventreference

Hello there

anyone knows about the new CallbackEventreference?

How does it really work... I made it working through a dropdown list..
I cannot understand how the "string arguments" works... how many
arguments can I pass and in what? how does it relates with the
javascript function"

thanks :)

Mar 14 '06 #1
2 1893
it MS first attempt at supporting Ajax. the current implementation allows
the client to pass one string arg to the server, and the server to return
one string arg.

the easiest way to understand it, is to look at the javascript code it uses.
you will see the javascript uses a XmlHttp (or a hidden iframe) to make an
async call to the webserver. asp.net recognizes the client callback, and
fire the server Callback events.

GetCallbackEventReference just returns javascript code needed to make a
server call. you combine this with your other client javascript to call the
backend. you could bundle it in your own function like:

string cbReference = Page.ClientScript.GetCallbackEventReference(this,
"arg", "ReceiveServerData", "context");
string callbackScript = "function CallServer(arg, context)" +
"{ " + cbReference + "} ;";
Page.ClientScript.RegisterClientScriptBlock(this.G etType(),
"CallServer", callbackScript, true);

then in client script to call the server with:

CallServer("datatosend","context");

then in your client script you define the function called when callback data
is recieved:

function ReceiveServerData(serverResponseArg,context)
{
// do something with server data
}
-- bruce (sqlwork.com)


"Varangian" <of****@gmail.com> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com...
Hello there

anyone knows about the new CallbackEventreference?

How does it really work... I made it working through a dropdown list..
I cannot understand how the "string arguments" works... how many
arguments can I pass and in what? how does it relates with the
javascript function"

thanks :)

Mar 14 '06 #2
thanks for your reply was helpful a couple of more questions though...

thats a bit of a drawback to pass only one parameter.
what actually is "arg" .. I always see this but is it a value or what ?
or just something that means that is passing one argument and only
argument can be passed..

which is the real javascript function ... the CallServer or the
ReceiveServerData ?
thanks again :)

Mar 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Varangian | last post by:
Hi there, about the GetCallBackEventReference.. .is there a way to pass more than one parameter to javascript, is it possible that it has that big drawback ??
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.