I am not an ActionScript expert but using AJAX or some page "load" is what you would need for clientside ActionScript to "talk" with ASP.
The ASP for an If is ...
If then
' code to be run
End if
The "" part is your conditional statement (e.g. If var = "this"). However an If isn't really what you want if the ASP is checking a database. Use an SQL query to look for that number. If the returned recordset is "blank" then you know the number doesn't exist. That is where you would have the If ..
If rs.EOF then
' there was no number match
Else
' the number was found
End if
Let us know how this helps. If you need all of this done then you may need more than one question because this is more of a project than a single question. Factors like the database, field names, and data types will all matter.
Let me know if you have a question or need more info.
bol