I want to check if an address starts with http://www.youtube.com.
If I have something like this
if rs("mainVideoName")="http://www.youtube.com*" then
This doesn't work, so how can I do it?
vbscript
I want to check if an address starts with http://www.youtube.com.
If I have something like this
if rs("mainVideoName")="http://www.youtube.com*" then
This doesn't work, so how can I do it?
Best Answer
Try this:
Starts with is tested by using
IntStr
and ensuring that it returns 1 as the starting position that the search string is found. Since you are testing a URL the code above uses a TextCompare to make insensitive to case.