JScript .NET, Part VII: Consuming add from ASP.NET - Doc JavaScript
JScript .NET, Part VII: Consuming add from ASP.NET
In this column we continue our series on JScript .NET. In Part I, we laid down the groundwork for JScript .NET, showing you how to install IIS and the .NET SDK, and how to compile and run a JScript .NET program. In Part II, we showed you the major differences between JavaScript and JScript .NET. In Part III, we focused on JScript .NET's classes and their division among namespaces. In Part IV we taught you how to use inheritance in classes and interfaces. In Part V, we covered the third holy grail of object oriented programming: polymorphism. In Part VI, we showed you how to define Web services in JScript .NET and how to consume them from Internet Explorer. In this column we'll show you how to consume Web services from ASP.NET pages.
Web services are getting very popular. You can consume them from both clients and servers. We showed you in other columns (97, 98, 99, 105, and 106) how to consume them from clients. In this column we'll show you how to consume them from servers. Since ASP.NET is a main vehicle for interacting with servers, we'll show you how to connect Web services to ASP.NET pages. In particular, we'll show you how to use the add
Web service from an ASP.NET page.
We'll first give you an ASP.NET primer. We'll explain the parallelism between the ASP.NET/JScript .NET pair and the HTML/JavaScript pair. We'll show you all ASP.NET's supported tags (controls). We'll then explain how to define your Web site on the IIS Web server, and how to connect between the Web site and the actual directory where the files reside. We'll teach you why you need to create a proxy for the Web service, and show you in details how to create its class, namespace, and .dll
file. We'll show you how to write your ASP.NET file, including the script section to handle the button events. We'll demonstrate by GIFs how to use the ASP.NET page on your Web server.
In this column you will learn:
- How to use ASP.NET
- How to define a virtual directory
- How to create a proxy
- How to create a .dll file
- How to write ASP.NET controls
- How to write JScript .NET for ASP.NET
- How to consume the
add
Web service
The following files were zipped for you: simpleCalc.asmx
(the add
Web service) and simpleCalcConsumer.aspx
(a consumer of the add
Web service).
Next: How to use ASP.NET
Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: June 30, 2002
Revised: June 30, 2002
URL: https://www.webreference.com/js/column113/index.html