-
Wierd If clause
Hi:
I have following code:
Set n = MyRecordset("NumberOfRadioButtons")
For i = 1 to n
Set CurrentOptionText = MyRecordset("OptionText" & i)
if CurrentOptionText <> "" then
Response.Write i
Response.Write "<input type=""radio"" name=""Selections"" value=""VotingOption"""
& i & ">"
Response.Write CurrentOptionText
Response.Write "<BR>"
end if
Next
n is a number I read from database, then I will display n choices, with the
info I stored in the database, I set those text to CurrentOptionText everytime...
For some reasons, all the Response.Write clauses have been executed beside
Response.Write CurrentOptionText.
It is really strange... does anyone know why?
-
Re: Wierd If clause
"Larry" <larry@levelogic.com> wrote:
>
>Hi:
>I have following code:
>Set n = MyRecordset("NumberOfRadioButtons")
>For i = 1 to n
> Set CurrentOptionText = MyRecordset("OptionText" & i)
> if CurrentOptionText <> "" then
> Response.Write i
> Response.Write "<input type=""radio"" name=""Selections"" value=""VotingOption"""
>& i & ">"
> Response.Write CurrentOptionText
> Response.Write "<BR>"
> end if
>Next
>
>n is a number I read from database, then I will display n choices, with
the
>info I stored in the database, I set those text to CurrentOptionText everytime...
>For some reasons, all the Response.Write clauses have been executed beside
>Response.Write CurrentOptionText.
>It is really strange... does anyone know why?
>
>
I saw you're checking for CurrentOptionText<>"", have you tried making sure
it's not null? Just a thought...
Lia
-
Re: Wierd If clause
that's what I am checking... I made sure it wasn't null in another piece of
code.
"Lia" <lingersoll@thesiggroup.com> wrote:
>
>"Larry" <larry@levelogic.com> wrote:
>>
>>Hi:
>>I have following code:
>>Set n = MyRecordset("NumberOfRadioButtons")
>>For i = 1 to n
>> Set CurrentOptionText = MyRecordset("OptionText" & i)
>> if CurrentOptionText <> "" then
>> Response.Write i
>> Response.Write "<input type=""radio"" name=""Selections"" value=""VotingOption"""
>>& i & ">"
>> Response.Write CurrentOptionText
>> Response.Write "<BR>"
>> end if
>>Next
>>
>>n is a number I read from database, then I will display n choices, with
>the
>>info I stored in the database, I set those text to CurrentOptionText everytime...
>>For some reasons, all the Response.Write clauses have been executed beside
>>Response.Write CurrentOptionText.
>>It is really strange... does anyone know why?
>>
>>
>
>I saw you're checking for CurrentOptionText<>"", have you tried making sure
>it's not null? Just a thought...
>
>Lia
>
-
Re: Wierd If clause
Larry,
Would this helps?
Response.Write "<input type=""radio"" name=""Selections""" &
" value=""VotingOption" & i & """> " & MyRecordset("OptionText") & i
Regards,
kv-
"Larry" <larry@levelogic.com> wrote:
>
>that's what I am checking... I made sure it wasn't null in another piece
of
>code.
>"Lia" <lingersoll@thesiggroup.com> wrote:
>>
>>"Larry" <larry@levelogic.com> wrote:
>>>
>>>Hi:
>>>I have following code:
>>>Set n = MyRecordset("NumberOfRadioButtons")
>>>For i = 1 to n
>>> Set CurrentOptionText = MyRecordset("OptionText" & i)
>>> if CurrentOptionText <> "" then
>>> Response.Write i
>>> Response.Write "<input type=""radio"" name=""Selections"" value=""VotingOption"""
>>>& i & ">"
>>> Response.Write CurrentOptionText
>>> Response.Write "<BR>"
>>> end if
>>>Next
>>>
>>>n is a number I read from database, then I will display n choices, with
>>the
>>>info I stored in the database, I set those text to CurrentOptionText everytime...
>>>For some reasons, all the Response.Write clauses have been executed beside
>>>Response.Write CurrentOptionText.
>>>It is really strange... does anyone know why?
>>>
>>>
>>
>>I saw you're checking for CurrentOptionText<>"", have you tried making
sure
>>it's not null? Just a thought...
>>
>>Lia
>>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks