-Log in
-Register (free)


-RSS Feeds
-New MyDesk Module
-Update to Profile

how to do a partial string compare
cheap kicks,cheap jordan 1 size 8-13 retro
cheap jordan kicks,cheap nike sb dunk shoes,cheap




 Forums /

Microsoft VBScript compilation (0x800A0401)
priyanka.j | Posted 6:19am 9. October 2009 Server Time |

hi all !!...im trying to use html tag inside asp code and then asp code again inside html tag....to give value to radio button....and getting following error....
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
Response.write "<input type='radio' name='a' value=<% rs("A")
---------------------------------------------------------^
this is th following code snippet:
<Form name="f1" method=post action="test1.asp?val=<%=iFlag+1%>">
<%

Response.write rs("Question")&"<br>"
Response.write "<input type='radio' name='a' value='<% rs("A")%>'><br>"
' Response.write "<input type='radio' name='b' value='<%rs("B")%>'><br>"
' Response.write "<input type='radio' name='c' value='<%rs("C")%>'><br>"
' Response.write "<input type='radio' name='d' value='<%rs("D")%>'><br>"


%>
im trying to write a code for online test...questions hv 4choices,radio buttons....fetching them from the database....plzzz help !!
katy8439 | Posted 7:40am 9. October 2009 Server Time |

As you're already in a script block you don't need to add the <% tags before and after the recordset.

The script to write out the values should be:

Response.write "<input type=""radio"" name=""a"" value=""" & rs("A") & """><br>"

Hope that helps

Katy
priyanka.j | Posted 12:33am 9. October 2009 Server Time |

@katy8439......im afraid...bt even tht isnt helping....!!im getting..
Microsoft VBScript compilation (0x800A03EA)
Syntax error...i hv tried almost all possible combinations of quote marks....
priyanka.j | Posted 12:34am 9. October 2009 Server Time |

how abt this??....
gives the similar error..:(
Response.write "<input type='radio' name='a'
value='"&rs('A')&"'><br>"
priyanka.j | Posted 12:43am 9. October 2009 Server Time |

@katy8439...hey im sorry my mistake...the code tht u suggested  does nt gv ne error...instead...im getting the radio buttons ...bt without any value against it....!!...no value is being asssigned to those buttons using the concatenation thing.....
1
Show all replies to 'Microsoft VBScript compilation (0x800A0401)'
To post a message to this discussion you need to be
a Haneng.com member. If you already are a member please log in
if not register as a member here (free).



| Info |
© Copyright 1997-2010 Alexander Haneng