Microsoft introduced the ASP.NET Web Matrix integrated development environment to provide an inexpensive method for creating ASP.NET Web applications and services. This is a valuable tool for creating ASP.NET solutions on a budget.
And yet, Microsoft has developed a tool that tops Web Matrix. In the near future, Microsoft will release the Express Edition of the Visual Web Developer. For now, the second beta version of this tool is available online as a free download. I'll highlight some of the features of this tool, and provide a simple example that will get you started with developing in Visual Web Developer 2005 Express (VWDE).
The Express editions of the Visual Studio line provide a lightweight and easy-to-use tool for developers who want to learn .NET. The Web Developer IDE, like the other IDEs, comes with starter kits to help beginners get their feet wet.
And, much like Web Matrix, the VWDE provides its own Web server for you to test your code. This makes it unnecessary to install IIS on your development machine, which is a convenience if you're running Windows XP Home Edition.
VWDE, however, offers much more than Web Matrix. Also, if you're familiar with Visual Studio .NET, you'll see that a lot of the same functionality exists in VWDE, including IntelliSense.
Start developing with VWDE
There are two types of models for creating ASP.NET pages: the single-file model in which the code is inserted in the page (much like classic ASP); and, there's the code separation model in which the code is included in a separate file from the visual elements portion of the file. The code separation model is available through a check box on the Add New Item wizard. When you select this check box, VWDE creates two files: SomePageName.aspx and SomePageName.aspx.cs (assuming you use C# for your code; otherwise, the extension will be .vb).
The page layout is created in a WYSIWYG editor. The code is available through a source code editor (e.g., Visual Studio .NET). When you separate the code, you generally add form elements (i.e., Web controls) by dragging the control from the toolbox to the WYSIWYG design area. To edit the control's event, you will usually double-click on the control. Then, you will be transported from the Web form WYSIWYG editor to the source code in the source code editor. From there you can add your custom code to handle the control's event.
Follow these steps to create a solution in the VWDE:
- Go to File | New Web Site.
- Choose ASP.NET Web Site from the list of installed templates. Make sure that Location is set to File System and use the default file location. Then, set the language to Visual C#.
- Add a new page to the solution by right-clicking the solution name in the Solution Explorer and choosing Add New Item.
- Choose Web Form from the list of installed templates, set the name to whatever (just keep the .aspx extension), and select the Place Code In A Separate File check box.
- When your Web form is added, make sure you're in the design view by clicking on the Design tab in the lower left-hand corner of the IDE.
- Click and drag a button control from the Toolbox to the design area.
- Double-click on the button control to reveal the Button1_Click event handler code.
- Add a line to write "Hello World!" to the Response buffer:
- Save your files and test your code by pressing [Ctrl][F5]--this will run your code without debugging ([F5] alone will allow debugging).
- When the browser opens, you should see the button on the page. Click on the button to see the words "Hello World!" appear. If this works, you should be able to start creating your own customized solutions.
protected void Button1_Click(object sender, EventArgs e)
Refer to the documentation included with VWDE to create more advanced solutions. Also, consult the IDE for guided tours and communities for help on creating VWDE solutions.