Iam creating shopping cart for my self and now Iam stuck with some non-logical problem.
I have page wich lists all items for each group like
next to each item I have textbox with name txtItem & recordset("id"). In this textbox I need to enter amount of how many items I want to add to my cart. Next to the txtItem I have image button 'add to cart' and I need to read that value from textbox and send it through QueryString for further actions.
When I've tried to read the value, I get a blank string.
txt = Request.Form("txtItem" & recordset("id"))
It looks logicaly, but doesen't work! what I'm doing wrong?
I forgot to say that this is all inside a recordset in do while loop... so when I Response.Write(recordset("id")) returns valid ID so this is OK, but still wan't work.
What's the correct way to read the value from such a textbox in do while loop?
Do While Not myRS.eof
strValues = strValues & request.form("textbox" & myRs("ID")) &","
strValues = left(strValues, len(strValues)-1)
arrValues = split(strValues,",")
so you are probably not too far wrong in what you are trying.... if you want to attach your code I'm happy to have a look over it for you.
with the page you have posted you are trying to mix and match request.querystring with request.form and it doesn't really work because you are getting a querystring from the hyperlink which is not submitting the form (so there are no form values).
that way all details will be available by request.form