R
Roland Hall
I have two questions which I am unable to find answers to:
1. What is the difference between Request.Form and Request.Item?
I can do this:
dim obj, postback, o
postback = Request.Form("postback")
if postback <> "" then
for each obj in Request.Form
o = Request.Item(obj)
if o <> "postback" then
session(obj) = o
end if
Response.Write session(obj) & "<br />" & vbCrLf
next
end if
What makes Request.Item different in this respect than Request.Form? Is
there a benefit one way or the other?
2. Is it possible to use FOR...EACH, with a form and make the variable an
object?
Ex.
If I use:
for each obj in Request.Form
obj is not an object as I cannot then write:
Response.Write obj.value to get the value of the form variable.
If my form was:
<input type="text" name="iname" value="" />
and I typed in Roland and submitted, I cannot with the FOR...EACH use
obj.value to get the value. Is there a way to do it that I am not aware of?
TIA...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
1. What is the difference between Request.Form and Request.Item?
I can do this:
dim obj, postback, o
postback = Request.Form("postback")
if postback <> "" then
for each obj in Request.Form
o = Request.Item(obj)
if o <> "postback" then
session(obj) = o
end if
Response.Write session(obj) & "<br />" & vbCrLf
next
end if
What makes Request.Item different in this respect than Request.Form? Is
there a benefit one way or the other?
2. Is it possible to use FOR...EACH, with a form and make the variable an
object?
Ex.
If I use:
for each obj in Request.Form
obj is not an object as I cannot then write:
Response.Write obj.value to get the value of the form variable.
If my form was:
<input type="text" name="iname" value="" />
and I typed in Roland and submitted, I cannot with the FOR...EACH use
obj.value to get the value. Is there a way to do it that I am not aware of?
TIA...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp