473,473 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Getting a huge number of paramters from nowhere

I discovered that when requested

http://localhost:52698/ws3/page.aspx

and issued a call

Response.Write(Request.Params.Count);

i got 50 parameters in count. When i
actually added some as in

http://localhost:52698/ws3/page.aspx?key=some

the number increased by two to 52. I'd
be delighted if somebody enlighten me
in this matter.

1. Why is it an increase by two? Is it
because the "key" and "some" are counted
as separate paramters?

2. Where in Gods love are the first
fifty parameters?!

3. Should i use Request.Params or is
there something more recommended, e.g.
Request.QueryString?
--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

Jun 27 '08 #1
5 1277
well Request.Params is a combined collection of Server, Form, QueryString,
Cookie and Server variables, so 50 is not a large count (most are server
variables).

you got 2 addition, because adding a querystring added the query string to
the server variables collection, and the parsing the query string added a
parameter to the querystring collecton.
-- bruce (sqlwork.com)
"K Viltersten" wrote:
I discovered that when requested

http://localhost:52698/ws3/page.aspx

and issued a call

Response.Write(Request.Params.Count);

i got 50 parameters in count. When i
actually added some as in

http://localhost:52698/ws3/page.aspx?key=some

the number increased by two to 52. I'd
be delighted if somebody enlighten me
in this matter.

1. Why is it an increase by two? Is it
because the "key" and "some" are counted
as separate paramters?

2. Where in Gods love are the first
fifty parameters?!

3. Should i use Request.Params or is
there something more recommended, e.g.
Request.QueryString?
--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

Jun 27 '08 #2
well Request.Params is a combined collection of Server,
Form, QueryString, Cookie and Server variables, so 50 is
not a large count (most are server variables).
By that logic, i'd expect the parameters passed into the
page using the exclamation mark to be at index 51 and
52 but they seem to be at index 0 and 1. Comments?
you got 2 addition, because adding a querystring added
the query string to the server variables collection, and the
parsing the query string added a parameter to the
querystring collecton.
Perhaps it's a matter of term confusion - is the part after
the exclamation mark called "querry string"?
--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

Jun 27 '08 #3

"K Viltersten" <tm**@viltersten.comwrote in message
news:68*************@mid.individual.net...
>well Request.Params is a combined collection of Server, Form,
QueryString, Cookie and Server variables, so 50 is not a large count
(most are server variables).

By that logic, i'd expect the parameters passed into the
page using the exclamation mark to be at index 51 and 52 but they seem to
be at index 0 and 1. Comments?
There's a difference between parameters "passed into the page" and
parameters in general. Server variables are not passed via the URL. They
are exchanged via request/response headers.
>
>you got 2 addition, because adding a querystring added the query string
to the server variables collection, and the parsing the query string
added a parameter to the querystring collecton.

Perhaps it's a matter of term confusion - is the part after
the exclamation mark called "querry string"?
Not the exclamation mark (!), the question mark (?). And yes, what comes
after the question mark is the querystring, so you are seeing indexes
referring to the querystring parameters.
-Scott
>

--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

Jun 27 '08 #4
>>well Request.Params is a combined collection
>>of Server, Form, QueryString, Cookie and
Server variables, so 50 is not a large count
(most are server variables).

By that logic, i'd expect the parameters
passed into the page using the exclamation
mark to be at index 51 and 52 but they seem
to be at index 0 and 1. Comments?

There's a difference between parameters
"passed into the page" and parameters in
general. Server variables are not passed via
the URL. They are exchanged via
request/response headers.
Right. Got it!
>>you got 2 addition, because adding a
querystring added the query string to the
server variables collection, and the parsing
the query string added a parameter to the
querystring collecton.

Perhaps it's a matter of term confusion - is
the part after the exclamation mark called
"querry string"?

Not the exclamation mark (!), the question
mark (?).
Of course. Silly me...
...what comes after the question mark is the
querystring, so you are seeing indexes
referring to the querystring parameters.
Thanks. It helped!

--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

Jun 27 '08 #5
In addition to what others have already said, by enabling page tracing (set
Trace="true" to @Page directive), you can see what these parameters in
different collections are.

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"K Viltersten" <tm**@viltersten.comwrote in message
news:68*************@mid.individual.net...
>I discovered that when requested
http://localhost:52698/ws3/page.aspx

and issued a call

Response.Write(Request.Params.Count);

i got 50 parameters in count. When i actually added some as in

http://localhost:52698/ws3/page.aspx?key=some

the number increased by two to 52. I'd
be delighted if somebody enlighten me
in this matter.

1. Why is it an increase by two? Is it because the "key" and "some" are
counted
as separate paramters?

2. Where in Gods love are the first fifty parameters?!

3. Should i use Request.Params or is there something more recommended,
e.g.
Request.QueryString?
--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

Jun 27 '08 #6

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

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
2
by: Chandra Mohan | last post by:
Getting 0 padded values in the columns. Hi All, I have a requirement to convert a integer to string and display it in Sql server with fixed length say 3 chars. (in c, we wud use %03d in...
5
by: UJ | last post by:
Is there any number I can get that is truly unique for a computer that can't be changed? I want to have a system whereby I have a computer that accesses a web service based on some unique value...
7
by: Peter Hansen | last post by:
Is in any way possible to define a variable as a integer-value which contain about 300 numbers in a row? I have thought about an Override-function for Data-types but I dunno how - but if it is...
4
by: darrel | last post by:
I can grab a random number in vb.net like this: Dim RandomClass As New Random Dim RandomNumber As Integer RandomNumber = RandomClass.Next(1, 26) However, what I want is a random number. Short...
7
by: Aaron Gray | last post by:
I put together the following code to get the href's parameters :- function GetParameters() { var arg = new Object(); var href = document.location.href; if ( href.indexOf( "?") != -1) { var...
10
by: Cliff | last post by:
Greetings, I have been trying to teach myself C++ over the past few weeks and have finally came across a problem I could not fix. I made a simple program that prints out a square or rectangle...
2
by: rocketfire97 | last post by:
I'm trying to call a COM object using C# but having no luck getting values back for passed in ref objects. I've tried the same call using VB.NET and can get data back. How would I implement the...
9
by: Adem | last post by:
Is it possible to get some info about an unknown exception, ie. the "catch (...)" case below: catch (const blah1 &ex) { cout << "blah1 exception." << endl; } catch (const blah2 &ex) {
0
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...
1
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...
1
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...
0
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
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...

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.