ASP/VBScript StrComp() Returns -1, 0, or 1, based on the result of a string comparison.
ShotDev Focus:
- Using Asp and StrComp() function.
Example
asp_strcomp.asp
<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Response.write StrComp("a","b")&"<br>"
Response.write StrComp("b","a")&"<br>"
Response.write StrComp("www.ShotDev.Com","www.ShotDev.Com")&"<br>"
Response.write StrComp("www.ShotDev.Com","Mr.Weerachai Nukitram")&"<br>"
Response.write StrComp("Mr.Weerachai Nukitram","www.ShotDev.Com")&"<br>"
%>
</body>
</html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_strcomp.asp
Screenshot


