This is an example for using Windows Script Components.
This is an example for using Windows Script Components.
Rate This is an example for using Windows Script Components.
(3(3 Vote))
<SCRIPTLET>
<Registration
Description="ConvertTemp"
ProgID="ConvertTemp.Scriptlet"
Version="1.00"
>
</Registration>
<implements id=Automation type=Automation>
<method name=Celsius>
<PARAMETER name=F/>
</method>
<method name=Fahrenheit>
<PARAMETER name=C/>
</method>
</implements>
<SCRIPT LANGUAGE=VBScript>
Function Celsius(F)
Celsius = 5/9 * (F - 32)
End Function
Function Fahrenheit(C)
Fahrenheit = (9/5 * C) + 32
End Function
</SCRIPT>
</SCRIPTLET>
'After You save it with *.sct extantion right click on file and chosse "Register". Now You may use it in Your ASP application
<%
Option Explicit
Dim objConvert
Dim sngFvalue, sngCvalue
sngFvalue = 50
sngCvalue = 21
Set objConvert = Server.CreateObject("ConvertTemp.Scriptlet")
%>
<%= sngFvalue %> degrees Fahrenheit is equivalent to <%= objConvert.Celsius(sngFvalue) %> degrees Celsius<BR>
<%= sngCvalue %> degrees Celsius is equivalent to <%= objConvert.Fahrenheit(sngCValue) %> degrees Fahrenheit<BR>
This is an example for using Windows Script Components. Comments
No comments yet — be the first to post one!
Post a Comment