ASP.Net - keeping it simple

Daily Newsletters

Sign up to ZDNet UK's daily newsletter.

ANALYSIS
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

Post your comment

In order to post a comment you need to be registered and logged in.

You can also log in with Facebook. Log in or create your ZDNet UK account below

  • Login

Will not be displayed with your comment

By signing up for this service, you indicate that you agree to our Terms and Conditions and have read and understood our Privacy Policy. Questions about membership? Find the answers in the Community FAQ

Get ZDNet UK's daily newsletter

Enter your email address to sign up

ZDNet UK Live

JCB33

How dare film makers, artists or anybody that invests in creativity stop us pirating their works for free. I want to be able to walk into my local...

2 hours ago by JCB33 on ACTA stumbles in Germany
Moley

@GrueMaster. I prefer horses for courses rather than one size fits all. I, and I suspect most other computer users, do not really wish to have...

4 hours ago by Moley on A tale of two distros: Ubuntu and Linux Mint
greycynic

The product that scares me every time I have to use it is the Office 2007 version of Excel. The first bug that I found was applying the median...

5 hours ago by greycynic on Ten flawed products that derail productivity
GrueMaster

Nice review and very informative. One thing I'd like to add (in reply to whs001's 1st question), the main reason to have the same interface from...

6 hours ago by GrueMaster on A tale of two distros: Ubuntu and Linux Mint
Frederick Wrigley

I'be been using Mint 12 since the RC came out, and I am far more happy with the Cinnamon, the Mate, and, yes (with extensions), theGnome 3...

7 hours ago by Frederick Wrigley via Facebook on A tale of two distros: Ubuntu and Linux Mint
bdantas

Excellent article. One small correction, though--although a fresh installation of Linux Mint 12 will, indeed, provide the user with a version of...

7 hours ago by bdantas on A tale of two distros: Ubuntu and Linux Mint
Alan Ralph

In related news, the ISPs club together to get the members of the Home Affairs Select Committee (ya goofed on that part, ZDNet UK) copies of "The...

8 hours ago by Alan Ralph via Facebook on MPs urge ISPs to take down terrorist material
Alan Ralph

In related news, the ISPs club together to get the members of the Home Affairs Select Committee (ya goofed on that part, ZDNet UK) copies of "The...

8 hours ago by Alan Ralph via Facebook on MPs urge ISPs to take down terrorist material
Moley

For Gnome 2 die-hards, it is possible to add icons to the bottom panel (or top top panel, if you prefer) which provide the exact Gnome 2...

9 hours ago by Moley on A tale of two distros: Ubuntu and Linux Mint
ramwellian

Your comments would seem pretty naive and immature. Your 'solution' appears to be, "gee, let's all just give in to the hackers and give them...

9 hours ago by ramwellian on Cloud computing security: no more oxymoron?
BugStalker

"Interesting thought ... If you installed Win7 as a dual boot on a machine that previously only had Linux, and it wrecked your Linux installation,...

9 hours ago by BugStalker on Windows 7 Declares War on GRUB
whs001

This is an excellent summary of Ubuntu and Mint and the interface differences between them. Most such articles take a very partisan position for...

9 hours ago by whs001 on A tale of two distros: Ubuntu and Linux Mint
Moley

@ewallace. Not so clear. Anyone can obtain the text, for example from here http://www.ustr.gov/webfm_send/2379. I support ACTA so long as it and...

10 hours ago by Moley on ACTA: Facts, misconceptions and questions
45283

I think WinRT is fantastic. I just wish it was an option for people that didn't want to go through Microsoft's App Store with its attendant...

13 hours ago by 45283 on Why Windows 8 needs architectural hygiene for WOA
Burn-IT

Nine people? £30m? Who's back pocket is that lot going in? And IF they say it is for new buildings, what about all the ones the government has...

14 hours ago by Burn-IT on Police set to launch three £30m e-crime hubs
ewallace

Just to be clear, nobody knows what is in the text of ACTA, here is a photograph of the text of ACTA http://twitpic.com/8h9iju as submitted to the...

14 hours ago by ewallace on ACTA: Facts, misconceptions and questions
fgvrg56

Unfortunately main issue is that ASUS is refusing to accept that they make some mistake on this version of asus Transformer prime. 1 - GPS sensor...

15 hours ago by fgvrg56 on Asus Eee Pad Transformer Prime Wi-Fi & GPS problems?
Ben Woods

@Marcus A fair question. Just talked with Archos which said it was working on an announcement for next week....

16 hours ago by Ben Woods on Archos confirms G9 Ice Cream Sandwich update schedule
Marcus Karlsson

Any update on this, considering the claimed "first week of February"?

17 hours ago by Marcus Karlsson via Facebook on Archos confirms G9 Ice Cream Sandwich update schedule
apexwm

Bill Goodrich : Just as al_langevin pointed out, with Windows Server 2008 there is no Services for Macintosh anymore. It's gone, not available....

1 day ago by apexwm on Windows Server 2008 drops the ball for Mac compatibility