Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Whopper of a problem
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00612227
Message ID:
00612358
Views:
26
This message has been marked as the solution to the initial question of the thread.
Yes, what you are doing is possible. Your problem is that you are not accessing the form names correctly. Look at the source code for your form page. Your input names will be called desc1, desc2, etc, right? So this is how you need to access them.
Dim descj, qtyj, costj, notesj, strj, j, numoflines
For j =1 to numoflines
	strj=Cstr(j)
	descj=trim(request.form("desc"+strj).item)
	qtyj=trim(request.form("qty"+strj).item)
	costj=trim(request.form("cost"+strj).item)
	notesj=trim(request.form("notes"+strj).item)
' do all the processing for the row here
	If descj = "" Then
		response.redirect "engineer.asp?error=511"
'etc...
Next
Use response.write for debugging.

-Dave

>here is some code that i am trying to get working
>the code in this form is quite easy to understand, i have on
>a previous screen read in a changable number of fields all
>with the name desci, qtyi, costi, notesi where i is anincremented
>number, but i do not know how to read the numbers back into
>the next page i created. the first bit of code here should
>read in all of the fields to variables and the second part of
>the code should go through the variables making sure that none
>of them are blank.
>i have tried a few different things to get this code working
>but to no avail and i have reduced it to this format so that
>it can be more easily explained
>is what i am trying to do even possible?
>any help on this would be much appreciated
>cheers
>~M
>
>
>
>
>For j =1 to numoflines
>Dim descj, qtyj, costj, notesj
> descj=trim(request.form("descj"))
> qtyj=trim(request.form("qtyj"))
> costj=trim(request.form("costj"))
> notesj=trim(request.form("notesj"))
>Next
>
>
>For i = 1 to numoflines
>Dim desci, qtyi, costi, notesi
> If desci = "" Then
> response.redirect "engineer.asp?error=511"
> Else If qtyi = "" Then
> response.redirect "engineer.asp?error=512"
> Else If costi = "" Then
> response.redirect "engineer.asp?error=513"
> Else If notesi = "" Then
> response.redirect "engineer.asp?error=514"
> End If
> End If
> End If
> End If
>Next
Previous
Reply
Map
View

Click here to load this message in the networking platform