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 1155
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: 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 via javascript.
What I need to be able to do is take that data passed via javascript
and, using vb.net as the code behind language, send it to a database
without posting it because when I post, the plugin is reloaded and
starts at the beginning....
| |
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: 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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |