|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi there,
I have one strange problem. In Request.Form You can iterate through a collection using a For Each item in ... Next loop I have tried it and it is providing me the values in random order. Means, if i have first entered : Name Surname Address Address1 Code: <form name="form1" method="post" action="test.asp"> <table> <tr> <td>Name</td> <td><input type="text" name="Name"></td> </tr> <tr> <td>Surname</td> <td><input type="text" name="surname"></td> </tr> <tr> <td>Address</td> <td><input type="text" name="address"></td> </tr> <tr> <td>Address1</td> <td><input type="text" name="address1"></td> </tr> <tr> <td><input type="submit" name="submit" value="submit"></td> </tr> </table> </form> test.asp <% dim V for each V in Request.Form Response.Write Request.Form.Key(V) &"<br>" Response.Write Request.Form(V) &"<br>" next %> Then i have received it in order, Address Name Surname Address1 by using For Each item in ... Next Why this happens? Is that posting of elements takes place in random order. Any help. Samir. Last edited by samirshah78 : October 16th, 2003 at 08:53 AM. |
|
#2
|
|||
|
|||
|
Sorry mate, this pretty much means exactly nothing to the community.
Did you read the [NEW USERS] - How to post a question. post ? ![]() We can not help you if you don't let us.... Could you possibly post some code samples, and maybe tell us - * what you are doing * what you are trying to achieve * and what is happening. Only then can we help.
__________________
How can I soar like an eagle when I'm flying with turkey's? |
|
#3
|
||||
|
||||
|
Hi Samir,
I looked around for that issue and found the following link: URL I hope it helps, |
|
#4
|
|||
|
|||
|
Thanks Guillaume,
It is working now. Instead of this : for each V in Request.Form Response.Write Request.Form.Key(V) &"<br>" Response.Write Request.Form(V) &"<br>" next I have just used: for k=1 to nCount arrShort(k-1,0) = Request.Form(k) arrShort(k-1,1) = Request.Form.Key(k) next It will works, It will give now result in proper order, in which i have made post to the form. Thanks for bubble short, but i don't need it now. Why?? big question still?? Because without it, i have got solution. A programming magic or what? Thanks, Samir. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > For Each item in ... Next |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|