ZDNet UK


Skip to Main Content

ZDNet.co.uk - Winner of Best Business Website 2007
  1. Home
  2. News
  3. Blogs
  4. Reviews
  5. Jobs
  6. Resources
  7. Community
  8. My ZDNet

 

ZDNet UK RSS Feeds


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 Konica

Did you find this article useful?
100 out of 163 people found this useful


Full Talkback thread

0 comments

Company/Topic Alerts

Create a new alert from the list below:













Featured Talkback

In association with Intel
Why do so many (virtually all) software packages think that they are so important that they have to be started automatically every time the computer boots? What is the largest number of "speed access", "update check", "camera download" and whatever other background programs you have ever seen running? Of those, how many did you really need?

By: J.A. Watson

Read full story:
Annoying software: a rogues' gallery

Discussions

David Long David Long

Not enough right minded people

Friday 10 October 2008, 4:15 PM

5 comments
Charles McLellan Charles McLellan

Thanks...

Friday 10 October 2008, 4:03 PM

5 comments

Vista Upgrade Blog

Vista - Still Running and Stable After...

Six weeks ago, when I wrote Renewed Adventures with Vista, I wondered if Microsoft had finally managed to fix it sufficiently that I wouldn't be forced to give up on it after a few... More

Post a comment

Official MS Windows 7 Bloggers

Check this out: http://blogs.msdn.com/e7...spx Its an official blog "Engineering Windows 7" Nothing. That's what is revealed. Until there is real... More

5 comments

Microsoft's Mojave just a desert vista

It didn't seem fair to wade into Microsoft's “Mojave Experiment” advert quite so soon after the flat earth incident. But The Economist has no such qualms: in this week's issue, it wonders... More

6 comments