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 ReceiveServerDa ta(rValue)
{
recbezet=rValue .substring(0,1)
recuur2=rValue. substring(2,3)
....
} 2 1632
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******** ******@TK2MSFTN GP03.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 ReceiveServerDa ta(rValue) { recbezet=rValue .substring(0,1) recuur2=rValue. substring(2,3) ... }
Thanks
"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:eS******** *****@TK2MSFTNG P03.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******** ******@TK2MSFTN GP03.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 ReceiveServerDa ta(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, "ss", &key, &value))
return NULL;
// do something with the C++ class here
|
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 calling-function for further handling.
If I've confused you, here's the code snippet (it's within a simple
Win32-Dll-project):
char* buffer; // global buffer - this one points to my buffer (for
puttiing it simple in here I assume memory is already...
|
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. However, as soon as I try to add
any "char *" parameters, I start getting exceptions in my C# app.
So far I've tried (among others):
public delegate int Test(char version);
and
public delegate int Test(string version); // won't work because...
|
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:
AsyncCallback callback = new AsyncCallback(this.NotifyIt);
FtpClient ftpC = new FtpClient(FtpServer, FtpUserName, FtpPassword);
private void button4_Click_1(object sender, System.EventArgs e)
{
|
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 C#. One of the problem is passing
a function address to a COM function as a parameter with another progress
value. My callback function is very simple using the progress value to update
my progressbar. Because this COM function usually takes a long...
| |
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 user to select multiple
values for displaying data on the page. When the user clicks on the button
control the client callback is triggered. The Client Callback works great.
I have no issues with the actual callback processing.
The issue is...
|
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 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?
|
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 a WebService is that
essentially we are passing an address of an object which resides on the
'local machine' i.e. a local machine object address. Surely when the
WebService method is called and run 'on the server', the reference type will
be...
|
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 below, you can
use the 'const' keyword in the function / method declaration. But how
to do this in C#?
*for example: "void Foo() const;"
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |