Advertisment

ASP.Net Web Matrix

author-image
PCQ Bureau
New Update

ASP.Net is the new platform from Microsoft that allows you to create dynamic Web pages quickly and easily. Based on the popular ASP (Active Server Pages) technology, this release works on the .Net programming platform to produce better

websites in terms of stability and performance. (For more on ASP.Net, see Introducing ASP.Net, page 82,

PCQuest, July 2002.)

Advertisment

Although ASP.Net pages, like their predecessor ASP pages, can be easily created in a text editor, like Notepad or TextPad, it is recommended to use a RAD (Rapid Application Development) tool like Microsoft Visual Studio.Net to create these pages. You can use drag-drop functionality, easy control event procedure handling, debugging, etc through this. However, at the price that VS.Net is sold, it is beyond the reach of many small companies and individuals.

Installing

the Web Matrix

Departing from their usual behavior, Microsoft has released a RAD tool for creating ASP.Net pages that works similarly to VS.Net, but is for free! You can get the tool, a 1.5 MB download, from www.asp.Net. You will, however, require the .Net framework installed on the machine where you wish to use this tool. 

Advertisment

Installing the tool is simple. Just run the .MSI file (a new executable format meant for installers) and specify the folder where it should install itself. Once installed, run the ASP.Net Web Matrix program.

You’ll be comfortable with the interface, especially if you’ve worked with Visual Studio 6.0 or .Net. The top part of the screen contains standard toolbars for file open, save, etc, along with ones for searching, changing fonts and styles and to open other windows. The left-hand side contains the toolbox with tabbed groupings of components and controls that you can use in a particular context. For example, when designing a page, the toolbox will contain things like textboxes, radio buttons and other such controls, whereas when you’re working with code, the toolbox contains drag-drop code snippets and code-builder wizards.

The central area is where you create your ASP.Net page. This holds the design, code and preview for the page you are creating. The right side has the workspaces, database connections, selected control properties, a class browser and a link to the ASP.Net community. 

Advertisment

Each time you run this program, it starts with a dialog box that allows you to create a new page. You can select from different categories, like General Pages, Data Pages, Mobile Pages and Web Services. Each category has more templates within them–for example, General has ASP.Net page, Use Control, CSS file, HTML File etc. Select the type of page you want, enter a new name and the location to save it and finally select the .Net language you want to code in–VB.Net or C#. 

In the design view that opens up, you can drag and drop controls from the left NavBar onto the page. Once the control appears in the design view, you can modify its properties by using the property window on the right-hand side. 

Inside

the Web Matrix

Advertisment

One of the most interesting functions of the Web Matrix relates to its ability to connect to the MSDE (MS Database Engine) server, which is a part of the .Net platform or to a local SQL Server instance. Once you do connect, you can access tables, stored procedures etc. and even create them from within this IDE itself. But the interesting part is yet to come. You can simply drag a table from the database window and drop it into the ASP.Net page. What happens after that is the best part. The table structure is created as a user control on the page with appropriate database connections and includes the ability to sort, contain paging, alternate item styling and many, many more features. By playing around with the properties of this control, you can customize the output to your heart’s desire. And all this without writing even a single line of code! Take a look at the screenshot of the page in IE to understand the power of using ASP.Net as well as Web Matrix itself.

Web Matrix has a lot of other useful features that will get you up and running with ASP.Net without the need for coding. These include Database Query Builder, that walk you though creating a complex SQL query, a Mailer code snippet and others. All standard ASP.Net controls are supported, and you can add others you’ve created or obtained in the toolbox. Web Matrix even comes with its own built-in Web Server, if the computer on which you are installing does not have IIS installed. If it is, it just uses

IIS. 

So, what’s the catch? For one, this is a very stripped down version of the Visual Studio.Net IDE, so don’t expect features like IntelliSense AutoComplete, built-in Dynamic Help and automatic creation of code-behind files. You will also not get the excellent debugger, tracer and version control that are part of its larger brother. 

However, if you are a hobbyist or a small company working on ASP.Net pages, this free tool from Microsoft can really increase your productivity and help you create dynamic pages easily.

Vinod Unny

Advertisment