Advertisement
Promo

Office applications Toolkit

ASP.Net - keeping it simple

William Sempf MCP, CIBS, IWA Builder.com

Published: 31 Jul 2002 12:40 BST

  • Email
  • Trackback
  • Clip Link
  • Print friendly
  • Post Comment

Microsoft surprised the IT community by making ASP.Net and the C# compiler/specification freely available. Now, a free Web design tool called ASP.Net Web Matrix is available as well. The tool is a watered-down version of Visual Studio .Net that supports basic ASP.Net coding for simpler Web applications. Let's take a look at this recently released software and see just what it can do.

Where can I get it?
You can download ASP.Net Web Matrix from the ASP.Net Web site, which has a short registration process. The software is closely integrated with the ASP.Net site, and good support is available. The senior ASP.Net specialists hang out in the online forums. They can assist with installation and running Web Matrix, as well as with ASP.Net.

What can it do?
Primarily, Web Matrix is good at writing ASP.Net Web pages. Figure A shows the Web Matrix environment. Open up Web Matrix after installation, and it will suggest that you create a new file (see Figure B). Next, you can build a Web form. You have the option of viewing the page in design view, HTML, code, or HTML and code together.

Figure A
ASP.Net Web Matrix environment

Figure B
Create a new Web Matrix file.

Web Matrix doesn't use the codebehind model you might be accustomed to from Visual Studio. Instead, all script is inline, as ASP Classic was. In design view, you can move a TextBox into the viewer and double-click on it. The viewer changes to code view, and you have the option to edit the TextChanged event handler of the box. Change to the All view, and you'll see that the event handler is within a SCRIPT RUNAT="server" block. Because of this, the code isn't compiled into a DLL, so there is no need for a build process. Also, Web Matrix has its own Web server -- the Web Matrix Server -- running on port 8080.

Use databinding with server controls
Databinding is made easy with Web Matrix. Need a dataset? No problem. Change to code view and drag the SELECT Data Method to the screen. A nice wizard walks you though selection of a database and some fields (for this example, a list of customers), and then it generates a function to call to get the dataset, as shown in Listing A.

This dataset can be databound to a datagrid just as normal. Back in design view, you can drag a datagrid on the screen, and three lines of custom code will bind the grid to the new dataset:Dim dataSet As System.Data.DataSet = MyQueryMethod()DataSet1.DataSource = dataSetDataSet1.DataBind() 

Manage SQL Server databases
The Data tab is in the same panel as the workspace. Click the Connection icon (the one that looks like a tin can with a tail). After walking through a similar connection wizard as above, you'll get the view and edit tables and stored procedures that are related to this database. This is just another hint that Microsoft wants developers to get away from developing with Access and start using SQL Server.

Create Mobile Web applications, and more
If you click the New File button in the upper-left corner, you'll see that there are quite a number of file types, all of which will give you a good start developing specific kinds of solutions:

  • Web forms
  • Web user controls
  • HTML pages
  • XML Web services
  • Class files
  • Style sheets
  • Configuration files
  • XML FILES, including schemas
  • Custom HTTP handlers
  • SQL files
  • Plain text
And that's just a rundown of the basic category of pages. There are additional categories, including:
  • Data pages -- Templates for often used Web forms
  • Mobile pages -- Including forms and user controls
  • Output caching
  • Security -- Log in and out
  • Web services -- Advanced concepts in Web services

Next

Previous

1 2


  • Email
  • Trackback
  • Clip Link
  • Print friendlyPrint with EPSON

Did you find this article useful?
102 out of 165 people found this useful


Full Talkback thread

0 comments

Company/Topic Alerts

Create a new alert from the list below:













Video icon

Video

Discussions

CA CA

Spin the colour wheel

Friday 11 December 2009, 10:25 AM

1 comment
CA CA

Beware of keeping your head in the clo...

Friday 11 December 2009, 12:53 AM

1 comment
CA CA

UK internet hit by LINX router failure

Friday 11 December 2009, 12:30 AM

1 comment
CA CA

McKinnon lawyers seek judicial review

Friday 11 December 2009, 12:27 AM

1 comment

Vista Upgrade Blog

Tinsel on the TARDIS

There were shepherds on the hill, and the Doctor popped his head out of the TARDIS and said "you might want to see this" and they were astounded. WHY do we pay for a TV licence?... More

Post a comment

Can I have fries with that? (Consumer...

Licence policies of Tech company's have been for a long time both complicated and 'Dick Turpin-esque', people just click 'I agree' without reading the Agreement. I do the same, but... More

1 comment

This Crap Site

How utterly stupid - I am ranked #40 in the top 100 - as a member of this site..... I mean HOW utterly stupid.... I have done sweet FA, I have only rejoined this site after a 3 or... More

2 comments


Skip Sub Navigation Links to CNET Brand Links

Help

Become part of the ZDNet community.

Newsletters