473,399 Members | 2,159 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,399 software developers and data experts.

effective way to POST an array of parameter code and values

If we have an array of parameterCode and parameterValue, what is the
best way to POST those
information?

Approach #1, I don't think this will work

parameterCode=1A&parameterValue=1B&parameterCode=2 A&parameterValue=2B&parameterCode=3A&parameterValu e=3B

Approach #2:

parameterCode_1=1A&parameterValue_1=1B&parameterCo de_2=2A&parameterValue_2=2B&parameterCode_3=3A&par ameterValue_3=3B
Please advise. thanks!!

Jul 23 '05 #1
1 1226
SPG
Why not post all the values in one param, concatenated and separated by a
delimiter?

So...

IE:

parameterCode=paramVal1|paramVal2|paramVal3 and so on..

Then in the script to read the vals, you can do this:

var paramArray = parameterCode.split("|");

which would give you an array of strings based ont he value of the
parameterCode variable

(Note: Assuming you are passing the value of the post parameter
"parameterCode" to a function..)

Bit vauge and sketchy but hopt this points you to the rigth solution

Steve

<jr********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
If we have an array of parameterCode and parameterValue, what is the
best way to POST those
information?

Approach #1, I don't think this will work

parameterCode=1A&parameterValue=1B&parameterCode=2 A&parameterValue=2B&parameterCode=3A&parameterValu e=3B

Approach #2:

parameterCode_1=1A&parameterValue_1=1B&parameterCo de_2=2A&parameterValue_2=2B&parameterCode_3=3A&par ameterValue_3=3B
Please advise. thanks!!

Jul 23 '05 #2

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

Similar topics

49
by: Lauren Wilson | last post by:
Hi folks, Just wondered if, for the sake of clarity, it is permissible to post small image files of an error box along with a text message about a problem with Access?
2
by: Tobias Olbort | last post by:
Hello, i've a outer function, which takes a params-array as a parameter. I want to pass this array to inner function with a params-array (e. g. string.format). When i've passed an integer to...
9
by: Alan Silver | last post by:
Hello, I'm a bit surprised at the amount of boilerplate code required to do standard data access in .NET and was looking for a way to improve matters. In Classic ASP, I used to have a common...
0
by: jim4u | last post by:
I am porting a vb library to vb.net. The vb library has an external call to an unmanaged dll. Existing code: //External function declaration Private Declare Function Uncompress& Lib...
0
by: jim4u | last post by:
I am porting a vb library to vb.net. The vb library has an external call to an unmanaged dll. Existing code: //External function declaration Private Declare Function Uncompress& Lib...
11
by: holla | last post by:
Write the following functions that can be called by a C program: Write a function to populate an array with random integers between 0 and 99. Use the following functions of which the prototypes...
11
by: abhiM | last post by:
I have a struct that has an array in it. I need to assign space to the array in a function and pass the corresponding struct by reference to another function so that it can store values into the...
8
by: arnuld | last post by:
Hi all, I have come to a point where I can comprehend C++ code much better. I will finish C++ Primer 4/e within next few days. Right now I am feeling the need to have have coding standards when I...
4
by: profactory | last post by:
Hi all, I have to include a C style DLL into C#. The dll has a function which should give me back a string, an array of integer and a single integer. The DllImport looks like this: public...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
tracyyun
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...
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,...
0
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...

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.