IIS ASP - Extract fields names

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > May 2007 > Extract fields names





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Extract fields names
Mark Goldin

2007-05-09, 7:19 pm

How do I extact fields names (not values) from the Request object?

Thanks


Bob Barrows [MVP]

2007-05-09, 7:19 pm

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) & "''<br>"
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"


Mark Goldin

2007-05-09, 7:19 pm

Am I missing something but I dont see how that is defferent from fields
values.

"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:e5KDE%23mkHHA.2272@TK2MSFTNGP02.phx.gbl...
> Mark Goldin wrote:
>
> <%
> dim key
> for each key in Request.Form 'or QueryString
> Response.Write key & " contains """ & Request.Form(key) & "''<br>"
> 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"
>



Bob Barrows [MVP]

2007-05-09, 7:19 pm

The key variable contains the field names. Did you run the code?
Mark Goldin wrote:[vbcol=seagreen]
> Am I missing something but I dont see how that is defferent from
> fields values.
>
> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> news:e5KDE%23mkHHA.2272@TK2MSFTNGP02.phx.gbl...

--
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

2007-05-09, 7:19 pm

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]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:OnGTcJnkHHA.208@TK2MSFTNGP05.phx.gbl...
> The key variable contains the field names. Did you run the code?
> Mark Goldin wrote:
>
> --
> 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"
>



Bob Barrows [MVP]

2007-05-10, 1:19 am

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"


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com