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)
....
} 2 1617
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) ... }
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) ... }
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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,...
|
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...
|
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. ...
|
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:
...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
| |