JScript .NET, Part X: Displaying Information: Doc JavaScript | WebReference

JScript .NET, Part X: Displaying Information: Doc JavaScript


JScript .NET, Part X: Displaying Information

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 Part VII, we showed you how to consume Web services from ASP.NET pages in general, and the add Web service in particular. In Part VIII, we showed you how to consume the IsPrime Web service. In Part IX, we introduced the concept of Code Behind. In this column we'll show you how to display information from JScript .NET code.

Displaying information from client-side JavaScript is very easy; you can use the alert() method to pop up a message box. How do you do it from JScript .NET code running on the server? In this column, we'll show you several ways to achieve such a capability. We'll first introduce you to three methods for displaying information from command-line compiled-and-run JScript .NET code: print(), System.Console, and System.Windows.Forms.MessageBox. Then, we'll explain how to display information from ASP.NET pages. We'll show you how to display variables with &lt%= and %>, and how to return values and write scripts at the client side with Response.Write().

In this column you will learn:

The following files were zipped for you: col116ex1.js, col116ex2.js, col116ex3.js, col116ex4.js, col116ex5.aspx, col116ex5.aspx.js, col116ex6.aspx, col116ex6.aspx.js, col116ex7.aspx, and col116ex7.aspx.js.

Next: How to use print()


Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: August 12, 2002
Revised: August 12, 2002

URL: https://www.webreference.com/js/column116/index.html