Hello, I am trying to use response.write in a if statement, and I want it to output to a specific column in my table.. when I place the if statment in the section I want it and run it I get a syntax error.. Can you please help my code is a follows for the if statement. I am pulling a result from the SQL server if it matches I have my first response if it does not I have my second response. it sounded simple to me but I am having a boohoo of a time.. Thanks for your help <% if (answerRS.Fields.Item("q1").Value) = "1" then Response.write = "Correct" Else Response.Write = "Incorrect" End If%> If you think I should outout to a text box and not a section in the table please let me know and if possible sample code would be helpful I am a newbie
try <% if (answerRS("q1")) = "1" then Response.write ("Correct") Else Response.Write("Incorrect") End If %> first line is just neater syntax, real error I thin was the "response.write =" . If that doesn't work post the syntax error regards
<% if not answerRS.eof then if (answerRS("q1")) = "1" then Response.write ("Correct") Else Response.Write("Incorrect") End If end if %>