473,834 Members | 1,874 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request.Queryst ring Advice

1 New Member
Hi All,

I am new to programming so apologies if this is a basic question. I am using the following code to request the form field values. however all works as expected but the field order is mixed up.

I have tried setting the tabindex on the fields,to try and resolve the issue, but no such luck.

Is there any way i can sort the field order using the tabindex ?

Thanks in advance.

*************** *************** *************** *************** ********

<%

FiName = Request.Form("A TID")

Set filesys = CreateObject("S cripting.FileSy stemObject")
set resultfile = filesys.CreateT extFile("D:\res ults\"& FiName & ".txt")
For each inputField In Request.QuerySt ring
For Each inputValue in Request.QuerySt ring(inputField )
resultfile .Writeline inputField & " = " & inputValue &"<BR>"
Next
Next
%>
Mar 25 '07 #1
1 1674
jhardman
3,406 Recognized Expert Specialist
No, the request.query string order is a mystery. I've heard it discussed before and the general consensus is that it is not predictable. I've handled the problem like this, I named all of the fields numerically:
<input name="inp1"><in put name="inp2"> etc. Then When I pulled it up I said:
Expand|Select|Wrap|Line Numbers
  1. dim i
  2. for i = 1 to 500 'some insanely high number
  3.    if request("inp" & i) <> "" then
  4.       response.write request("inp" & i) & "<br>" & vbNewLine
  5.    end if
  6. next
  7.  
you could also put the names of the inputs in a numbered array like this
Expand|Select|Wrap|Line Numbers
  1. dim inputs(500)
  2. inputs(1) = "userName"
  3. inputs(2) = "favExoticAnimal"
  4. inputs(3) = "hairStyle"
  5. dim i
  6. for i = 1 to 500
  7.    if request(inputs(i)) <> "" then
  8.       response.write request(inputs(i)) & "<br>" & vbNewLine
  9.    end if
  10. next
Sorry I couldn't be more help.

Jared
Mar 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
17775
by: John Davis | last post by:
I want to know what's the differences between Request.Form("Field Name") and Request.QueryString("Field Name") OR they function exactly the same, which is to return the value of the field?? Thanks, John
4
2747
by: Max | last post by:
Hello. This is the first time I've posted to a newsgroup, and I do this because I'm in desperate need of help. I'm working a user management system, and when I activate a user that has registered to my system, the current admin user logged in gets logged out. I can't seem to work out how - I can't even trace back where some of the variables are coming from (for example, the "ref" part of the Request.QueryString method). Could someone...
5
2427
by: Ivan | last post by:
hi, I saw some program using "request("fieldname") " instead of "request.QueryString" to get the value from URL, what's the different ?? thanks
4
13245
by: Steve | last post by:
Hi- I'd like to set values in the QueryString if I detect that a user submits a bad value, say... ?id=333 where there is no id '333', I would like to set it to '0' for example. I tried to use Request.QueryString.Set("id", "0"); it says it is Read Only. How can this be done? Why is there a Set() method if you can't use it?
2
1844
by: mahsa | last post by:
Hi have have some link like thi http://x.com/Shoppingcart.aspx?pn=ps50210&qty_ps50210=1&pn=excel&qty_excel=1&pn=l4504000&qty_l4504000=1&sku=PS50210&cat=laminate&action=updat now I want to request the dat I use this code in as <%For Each strPartNo In Request.QueryString("pn" lngQty = Request.QueryString("qty_" & strPartNo strPartNo = LCase(strPartNo Response.Write("strPartNo"& strPartNo& lngQty Next %
4
25366
by: Guoqi Zheng | last post by:
On my application, I need to have different action based on the pass in query string. When the query string is not presented, I try to use If request.querystring("id") ="" THEN ...... This is what I did in trational asp, however if I did abov in ASP.NET, I always got an error of "Object reference not set to an instance of an object. " How should I solve the problem?
1
3480
by: C | last post by:
Hi, I have been using VB.Net for the past 2 years and have moved to C# I send a value in the URL to a page. In my called page I do below. int intTest = int.Parse(Request.QueryString);
0
14257
by: ricklafleur | last post by:
I'm using CSharp/ASP.NET 2.0 and trying to create a simple search page that records the user query in the URL (so can be bookmark) and also re-writes the query int the original TextBox. This only works once; there after the old query gets re-written to the TextBox regardless of what is entered. I think this is because I'm using the Page_Load event which may being fired, replacing the new query with the one in the current URL, between time I...
2
5523
by: Doogie | last post by:
Hi, I'm writing Javascript code to parse out a query string. I want to handle the case where a parameter value may not be sent. So consider a parameter called "State". If the user doesn't pass that in if I do this: var state = <%=Request.QueryString%> This returns an undefined object that I can't seem to do any checks
0
9799
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, 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...
0
10793
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, 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...
0
10510
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 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...
0
9331
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, 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...
1
7758
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 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...
0
6954
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();...
1
4427
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 we have to send another system
2
3978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3081
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 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...

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.