VBScript Functions The Len Function

posted by Scudyen date: Thursday, May 22, 2008 category: ASP
  Featured Story | Printable View | Email It | Comments | Write Comment

In this series of our ASP Developer Articles, we will examine a new VbScript function called as ' The Len() Function'. With LEN functions you can calculate the length of the string. Following function calculates the length of a string taken from input area.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>The Len() Function</title>
</head>
<body>

<form action="lenfunction.asp" method="post">
<input type="text" name="strString" size="25" />
<input type="submit" name="func" value="Calculate Length of String" />
<%

    dim strString
    strString = trim(request.Form("strString"))
   
    Response.Write "Length of string is : " & Len(strString)
   
%>
</body>
</html>

Happy Coding !


Custom Search



Gazatem Technologies Active News Manager


page counter

Listed with 411asp.net
Listed with 4aspin.com
PHP, ASP, .NET, JSP Resources, Reviews