Extract fields names
am 09.05.2007 21:11:57 von Mark GoldinHow do I extact fields names (not values) from the Request object?
Thanks
How do I extact fields names (not values) from the Request object?
Thanks
Mark Goldin wrote:
> How do I extact fields names (not values) from the Request object?
>
> Thanks
<%
dim key
for each key in Request.Form 'or QueryString
Response.Write key & " contains """ & Request.Form(key) & "''
"
next
%>
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Am I missing something but I dont see how that is defferent from fields
values.
"Bob Barrows [MVP]"
news:e5KDE%23mkHHA.2272@TK2MSFTNGP02.phx.gbl...
> Mark Goldin wrote:
>> How do I extact fields names (not values) from the Request object?
>>
>> Thanks
>
> <%
> dim key
> for each key in Request.Form 'or QueryString
> Response.Write key & " contains """ & Request.Form(key) & "''
"
> next
> %>
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
The key variable contains the field names. Did you run the code?
Mark Goldin wrote:
> Am I missing something but I dont see how that is defferent from
> fields values.
>
> "Bob Barrows [MVP]"
> news:e5KDE%23mkHHA.2272@TK2MSFTNGP02.phx.gbl...
>> Mark Goldin wrote:
>>> How do I extact fields names (not values) from the Request object?
>>>
>>> Thanks
>>
>> <%
>> dim key
>> for each key in Request.Form 'or QueryString
>> Response.Write key & " contains """ & Request.Form(key) & "''
"
>> next
>> %>
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
My problem is that I am trying to do in Visual Foxpro. Looks like Fox has
different syntax.
Here is code that works for fields values:
loFormVars = Request.Form
FOR EACH lcFormVar in loFormVars
INSERT INTO test values('', Request.Form(lcFormVar).Item())
ENDFOR
"Bob Barrows [MVP]"
news:OnGTcJnkHHA.208@TK2MSFTNGP05.phx.gbl...
> The key variable contains the field names. Did you run the code?
> Mark Goldin wrote:
>> Am I missing something but I dont see how that is defferent from
>> fields values.
>>
>> "Bob Barrows [MVP]"
>> news:e5KDE%23mkHHA.2272@TK2MSFTNGP02.phx.gbl...
>>> Mark Goldin wrote:
>>>> How do I extact fields names (not values) from the Request object?
>>>>
>>>> Thanks
>>>
>>> <%
>>> dim key
>>> for each key in Request.Form 'or QueryString
>>> Response.Write key & " contains """ & Request.Form(key) & "''
"
>>> next
>>> %>
>>>
>>> --
>>> Microsoft MVP - ASP/ASP.NET
>>> Please reply to the newsgroup. This email account is my spam trap so
>>> I don't check it very often. If you must reply off-line, then remove
>>> the "NO SPAM"
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
Mark Goldin wrote:
> My problem is that I am trying to do in Visual Foxpro.
?? Why is a database relevant to a question about the ASP Request object?
> Looks like Fox
> has different syntax.
> Here is code that works for fields values:
> loFormVars = Request.Form
>
> FOR EACH lcFormVar in loFormVars
>
> INSERT INTO test values('', Request.Form(lcFormVar).Item())
>
> ENDFOR
>
You might want to post future questions to a foxpro group ...
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"