473,395 Members | 1,443 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,395 software developers and data experts.

querystring to dictionary object transform

I can't seem to do this:

I want to take a query string and place two halves of the querystring
into two separate dictionary objects.

So... I loop through the collection of querystring items, right?

When I get to a certain item in the querystring, all items after that
are to be put into the SECOND dictionary object.

HOW do I set a variable switch in some way to say, "OK, from now on
looping through the querystirng collection, don't put the name/value
pair into the FIRST dictionary object, but put them in the SECOND
dictionary object.

At this point my switch keeps getting "reset"...

<code snippet start>

set orderFobj = [dictionaryobject]
set cartObj = [dictionaryobject]
cutswitch = FALSE

For each item in Request.QueryString

if item = "cuthere" then
cutswitch = TRUE
end if

if cutswitch = FALSE then
orderFObj.Add item, Request.QueryString(item)
elseif cutswitch = TRUE then
cartObj.Add item, Request.QueryString(item)
end if
next

<code snippet end>

Jul 19 '05 #1
1 2926
On Thu, 10 Jun 2004 20:20:53 GMT, bo****@yutzy.com wrote:

I know what's wrong.

I'm trying to detect WHEN I get to a certain point in the queryString
and then start putting the name/value pairs into a second dictionary
object, BUT, the logical order of the querystring as it appears in
TEXT is not the logical order of the collection in the querystring
object.
I can't seem to do this:

I want to take a query string and place two halves of the querystring
into two separate dictionary objects.

So... I loop through the collection of querystring items, right?

When I get to a certain item in the querystring, all items after that
are to be put into the SECOND dictionary object.

HOW do I set a variable switch in some way to say, "OK, from now on
looping through the querystirng collection, don't put the name/value
pair into the FIRST dictionary object, but put them in the SECOND
dictionary object.

At this point my switch keeps getting "reset"...

<code snippet start>

set orderFobj = [dictionaryobject]
set cartObj = [dictionaryobject]
cutswitch = FALSE

For each item in Request.QueryString

if item = "cuthere" then
cutswitch = TRUE
end if

if cutswitch = FALSE then
orderFObj.Add item, Request.QueryString(item)
elseif cutswitch = TRUE then
cartObj.Add item, Request.QueryString(item)
end if
next

<code snippet end>


Jul 19 '05 #2

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

Similar topics

1
by: none | last post by:
or is it just me? I am having a problem with using a dictionary as an attribute of a class. This happens in python 1.5.2 and 2.2.2 which I am accessing through pythonwin builds 150 and 148...
16
by: Ling Lee | last post by:
Hello. I'm trying to write a small program that lets you put in a number as an integer and then it tells you the textuel representation of the number. Like if your input is 42, it will say...
10
by: Luis P. Mendes | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, my program builds a dictionary that I would like to save in a file. My question is what are the simple ways to do it? The first solution...
3
by: spradl | last post by:
Anyone have a VB function or know how to retrieve original querystring values after they have been decryted and lie within a string? For example: Say I have the querystring...
26
by: Alan Silver | last post by:
Hello, I have a server running Windows Server 2003, on which two of the web sites use the MegaBBS ASP forum software. Both sites suddenly developed the same error, which seems to be connected to...
2
by: jg | last post by:
I was trying to get custom dictionary class that can store generic or string; So I started with the example given by the visual studio 2005 c# online help for simpledictionay object That seem...
1
by: john wright | last post by:
I have a dictionary oject I created and I want to bind a listbox to it. I am including the code for the dictionary object. Here is the error I am getting: "System.Exception: Complex...
4
by: Betina Andersen | last post by:
I have a dictionary object, then I create a new dictionary object and sets it equal to my original, then I pass the new dictionary object to a function that changes some of my values - but then my...
4
by: NullQwerty | last post by:
Hi folks, I have a Dictionary which contains a string key and an object value. I want the object value to point to a property in my class and I want it to be by reference, so that later on I...
0
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...
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
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
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...

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.