473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to pass more than one value with client callback?

Hi,

I have to pass a lot of variables from vb.net to javascript using client
callback. the problem is that there are single variables, but also arrays
with differents indexes.
I have two questions:
1) is this technology made for passing a lot of variables or in fact only
for one?
2) does it exist a esier way to pass the values and to recover them in
javascript?
Thanks for advice.
André

So far i did this:
Vb.net:
Dim pcbez, uurbez, logonbez, tpebez, htoebez, hlokbez
ret = recbezet & "," & recuur2 ' single variable
pcbez = Join(pcbezet, ",") ' array index=10
uurbez = Join(uur, ",") ' array index=10
logonbez = Join(logon, ",") ' array index=10
tpebez = Join(tpe, ",") ' array index=10
htoebez = Join(htoe, ",") ' array index=5
hlokbez = Join(hlok, ",") ' array index=5
returnValue = ret & "," & pcbez & uurbez & logonbez & tpebez & htoebez &
hlokbez

Javascript
function ReceiveServerData(rValue)
{
recbezet=rValue.substring(0,1)
recuur2=rValue.substring(2,3)
....
}
Jun 22 '06 #1
2 1146
You can only pass back one value, so concatenating them together and then
splitting them apart again on the other end is the standard solution. It
looks like you're pretty much doing that already so I don't have any
complaints.
Here's an example I put together:
http://SteveOrr.net/articles/WebChat.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"André" <yt*@dfd.az> wrote in message
news:uK**************@TK2MSFTNGP03.phx.gbl...
Hi,

I have to pass a lot of variables from vb.net to javascript using client
callback. the problem is that there are single variables, but also arrays
with differents indexes.
I have two questions:
1) is this technology made for passing a lot of variables or in fact only
for one?
2) does it exist a esier way to pass the values and to recover them in
javascript?
Thanks for advice.
André

So far i did this:
Vb.net:
Dim pcbez, uurbez, logonbez, tpebez, htoebez, hlokbez
ret = recbezet & "," & recuur2 ' single variable
pcbez = Join(pcbezet, ",") ' array index=10
uurbez = Join(uur, ",") ' array index=10
logonbez = Join(logon, ",") ' array index=10
tpebez = Join(tpe, ",") ' array index=10
htoebez = Join(htoe, ",") ' array index=5
hlokbez = Join(hlok, ",") ' array index=5
returnValue = ret & "," & pcbez & uurbez & logonbez & tpebez & htoebez &
hlokbez

Javascript
function ReceiveServerData(rValue)
{
recbezet=rValue.substring(0,1)
recuur2=rValue.substring(2,3)
...
}

Jun 22 '06 #2
Thanks

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:eS*************@TK2MSFTNGP03.phx.gbl...
You can only pass back one value, so concatenating them together and then
splitting them apart again on the other end is the standard solution. It
looks like you're pretty much doing that already so I don't have any
complaints.
Here's an example I put together:
http://SteveOrr.net/articles/WebChat.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"André" <yt*@dfd.az> wrote in message
news:uK**************@TK2MSFTNGP03.phx.gbl...
Hi,

I have to pass a lot of variables from vb.net to javascript using client
callback. the problem is that there are single variables, but also arrays with differents indexes.
I have two questions:
1) is this technology made for passing a lot of variables or in fact only for one?
2) does it exist a esier way to pass the values and to recover them in
javascript?
Thanks for advice.
André

So far i did this:
Vb.net:
Dim pcbez, uurbez, logonbez, tpebez, htoebez, hlokbez
ret = recbezet & "," & recuur2 ' single variable
pcbez = Join(pcbezet, ",") ' array index=10
uurbez = Join(uur, ",") ' array index=10
logonbez = Join(logon, ",") ' array index=10
tpebez = Join(tpe, ",") ' array index=10
htoebez = Join(htoe, ",") ' array index=5
hlokbez = Join(hlok, ",") ' array index=5
returnValue = ret & "," & pcbez & uurbez & logonbez & tpebez & htoebez &
hlokbez

Javascript
function ReceiveServerData(rValue)
{
recbezet=rValue.substring(0,1)
recuur2=rValue.substring(2,3)
...
}


Jun 23 '06 #3

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

Similar topics

6
by: Harri Pesonen | last post by:
How do I pass the calling C++ class reference (or anything) to a callback? My code is: static PyObject* emb_Set(PyObject *self, PyObject *args) { char *key, *value; if(!PyArg_ParseTuple(args,...
8
by: Ekim | last post by:
my question is as follows: I've got a DLL in which I have a method GetBuffer (this one is extern, exported, is called from outside this program) which shall pass a char-buffer to the...
7
by: SB | last post by:
What is the proper way to pass a character array (char *) from a "C" dll to a C# method (delegate) in my app? Getting the dll (which simulates a third party dll) to call my delegate works fine. ...
1
by: Lenn | last post by:
Hi, I am using .BeginInvoke to make an asynchronous call to a function, and passing in a AsyncCallback, so client gets notification when method completes, relevant code is provided below: ...
7
by: Andy | last post by:
Hi, I have a complicated question that I'm hoping someone can help me out with. I have a webpage that contains a plug-in. This plug-in can communicate/pass data with the webpage that contains it...
6
by: Minfu Lu | last post by:
I have a problem dealing with passing a function address to a COM callback. I use this COM function for communicating to a hardware. My original project was written in VB. I have converted it to...
0
by: skberen | last post by:
Issue: We have a web user control on a web page (aspx) that uses the new ASP.Net 2 feature Client Callback. The web user control is using a CheckBoxList control and button control to allow the...
2
by: André | last post by:
Hi, I have to pass a lot of variables from vb.net to javascript using client callback. the problem is that there are single variables, but also arrays with differents indexes. I have two...
5
by: David++ | last post by:
Hi folks, I would be interested to hear peoples views on whether or not 'pass by reference' is allowed when using a Web Service method. The thing that troubles me about pass-by-reference into...
9
by: raylopez99 | last post by:
I'm posting this fragment from another thread to frame the issue clearer. How to pass an object to a function/method call in C# that will guarantee not to change the object?* In C++, as seen...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.