Hello again,
I've tried looking for some help on looping through a form collection for field names. I found something that gets values of the form collection but I need field names as well. I've also looked at the FormMail.asp which actually does this but when I duplicate there code(no real trick) I get the values not the field names. Any suggestions?
At the top of the form Response.buffer is set to True. Does that impact what I'm trying to do?
This is the FormMail.asp code:
for i = 1 to Request.Form.Count
for each name in Request.Form
if Left(name, 1) <> "_" and Request.Form(name) is Request.Form(i) then
if str <> "" then
str = str & ","
end if
str = str & name
exit for
end if
next
next
My simple test code is as follows:
for i=1 to Request.Form.Count
for each Name in Request.Form
Response.Write Request.Form(Name) & "<BR>"
next
next
As I said I get values but no names.
Lamar
I've tried looking for some help on looping through a form collection for field names. I found something that gets values of the form collection but I need field names as well. I've also looked at the FormMail.asp which actually does this but when I duplicate there code(no real trick) I get the values not the field names. Any suggestions?
At the top of the form Response.buffer is set to True. Does that impact what I'm trying to do?
This is the FormMail.asp code:
for i = 1 to Request.Form.Count
for each name in Request.Form
if Left(name, 1) <> "_" and Request.Form(name) is Request.Form(i) then
if str <> "" then
str = str & ","
end if
str = str & name
exit for
end if
next
next
My simple test code is as follows:
for i=1 to Request.Form.Count
for each Name in Request.Form
Response.Write Request.Form(Name) & "<BR>"
next
next
As I said I get values but no names.
Lamar