Unfortunately I have to write an application for a client in ASP. For some reason they think that ASP/SQL Server is the way to go. Anyway, I'm trying to do a simple select population and tag on "selected" to whichever one the current ID matches up with. Here's my code:
While Not jobs.EOF
If jobs.Fields.Item("title") <> "" Then
Response.Write "<option value=""" & jobs.Fields.Item("id").Value & """"
If jobs.Fields.Item("id").Value = id Then
Response.Write " selected"
End If
Response.Write ">" & jobs.Fields.Item("title").Value & "</option>"
End If
jobs.MoveNext()
Wend
However, it doesn't output selected for any of them (I've made sure numerous times that they are actually equal, and every single time it's correct). What's the deal here?
You don't even understand that the thing you're annoyed at isn't ASP, it's VBScript. And you're only annoyed at it because you're too incompetent at using it to understand how it handles data types.
Name:
Anonymous2007-05-13 18:39 ID:47iH4RPt
>>5
For all the crappy things MS has written, ASP is at least an order of magnitude *more* consistent than PHP.
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy