VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This is an example for using Windows Script Components.

by Michael Highguy (7 Submissions)
Category: Active Server Pages
Compatability: ASP (Active Server Pages)
Difficulty: Unknown Difficulty
Originally Published: Sat 6th July 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This is an example for using Windows Script Components.

Rate This is an example for using Windows Script Components.




<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>

Download this snippet    Add to My Saved Code

This is an example for using Windows Script Components. Comments

No comments have been posted about This is an example for using Windows Script Components.. Why not be the first to post a comment about This is an example for using Windows Script Components..

Post your comment

Subject:
Message:
0/1000 characters