Re: Syntax Problem by Chris
Chris
Sun Jun 20 20:09:59 CDT 2004
ZZ = Request(NameOfField) <!-- Line I am having Problems With -->
No need for the string delimiters since NameOfField is a variable with a string value.
and .. for your own sanity I suggest choosing a better naming convention for variables such as
Hungarian notation:
[scope][type][Name]
giving:
Dim plngCounter
Dim pstrFieldName
Dim pvarValue
plngCounter = plngCounter + 1
pstrFieldName = "FL" & plngCounter
pvarValue = Request(pstrFieldName)
Response.Write "This is FL7 " & Request("FL7") & " " & "| " & pvarValue & " |" & pstrFieldName
You should also use Option Explicit as the first line of ASP code to ensure that all variables are
dim'd before being available for use - cuts down on accidental misnamed variables.
Cheers,
Chris.
"Tony" <Tony@discussions.microsoft.com> wrote in message
news:C2B86D1A-0EB2-4359-BABC-53A485F06B7F@microsoft.com...
I have a previous page where I have to create the field names. Everything work sperfect except when
I go to request the data on the next page. The field I am creating is a checkbox field.
I need to know if I can do what I am trying to do? I have been at this for about 15 days straght.
I am a teacher who does a little VB programming, but very little ASP.
Here is my code
IX = IX + 1
NameOfField = "FL" & IX
ZZ = Request'"( & "NameOfField" & )'" <!-- Line I am having Problems With -->
Response.Write "This is FL7 " & Request("FL7") & " " & "| " & ZZ & " |" & NameOfField <!-- This
line for testing code only! -->
Thanks a Lot for any constructive help.
Tony