When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
Message Board
Related Web Technologies
User Tips!
Coding Tips

Sample Chapters
Commonly Asked Message Board Questions
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article
ASP ASP.NET ASP FAQs Message Board Feedback
Print this page.
Published: Thursday, May 04, 2000

Building Windows Script Components, Part 2

  • Read Part 1

  • In Step 1 we looked at Step 1 of the Windows Script Wizard. In this part we'll examine the remaining five steps.

    - continued -

    Once you've entered the registration information, hit next to continue to Step 2. In Step 2 you need to enter some high-level information about the component. For this component, choose to use VBScript. For components that will be used as COM components in an ASP page, select the "Support Active Server Pages" choice. This will allow the COM component to access the ASP intrinsic objects such as Response, Request, etc. Finally you must decide if you want to allow for interactive Debugging or Error checking. These are options that should be selected when developing a component.

    The Error checking option, if selected, displays an alert box on the Web server when an error occurs in the component. When this is selected, if an error occurs in the component, it will not be shown in the browser, but rather on the Web server's desktop. The Debugging option, if selected, allows the Microsoft Script Debugger to be run in the event of an error. These two options should be selected when developing a component; however, when your component is going live and will be used by others not developing from the Web server, these should be turned off.

    Enter Registration into Step 2 of the Windows Script Component Wizard

    Step 3 of the wizard prompts for properties for the component. You can enter all of the component's properties here, whether they are read/write, read-only, or write-only, and what their default values are. Since our example component has no properties, simply hit next on this Step, leaving the property listing blank.

    Step 4 prompts for a list of the component's methods and their parameter lists. Our class has two methods: Celcius2Fahrenheit and Fahrenheit2Celcius. Each of these methods expect a single parameter: a temperature to convert. The below screenshot shows Step 4 of the Wizard with the appropriate values entered:

    Enter Registration into Step 4 of the Windows Script Component Wizard

    Step 5 prompts for the component's events. Since our component has no events, leave this section blank. Finally, Step 6 provides a summary of the options selected. If everything looks to be in order, go ahead and click Finish, which will create the Windows Script Component for you, Temperature.wsc.

    In Part 3 we'll look at entering the source code for this component. We'll also look at how to register and use our new scripted component!

  • Read Part 3
  • Read Part 1

  • ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article