web 2.0

ASP/VBScript StrComp()

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

  1. <% Option Explicit %>  
  2. <html>  
  3. <head>  
  4. <title>ShotDev.Com Tutorial</title>  
  5. </head>  
  6. <body>  
  7. <%  
  8. Response.write StrComp("a","b")&"<br>"  
  9. Response.write StrComp("b","a")&"<br>"  
  10. Response.write StrComp("www.ShotDev.Com","www.ShotDev.Com")&"<br>"  
  11. Response.write StrComp("www.ShotDev.Com","Mr.Weerachai Nukitram")&"<br>"  
  12. Response.write StrComp("Mr.Weerachai Nukitram","www.ShotDev.Com")&"<br>"  
  13. %>  
  14. </body>  
  15. </html>  

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_strcomp.asp

Screenshot

ASP/VBScript & StrComp()

.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.