unterminated string constant error when registering startup script from asp.net
Posted on 2006-11-01
Experts, I keep getting the unterminated string constant error when I try to register a startup script from my code behind file. I know its a syntax error and should be an easy fix, but I am not sure what it is. Take a look at my, can anyone see what I am missing
'Cannot get this to work
Dim finalstr As String
str = recordupdate("Select records from table") ' this is a function that returns a message if the sql went through
finalstr = "<script> alert('" & str & "');</script>"
'This works fine
str = "<script> alert('Maintenance number required!');</script>"
I get the error when I try to pull the message from a function.